Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
dvprog_12 [2013-04-15 14:16]
Daniel Viström created
dvprog_12 [2015-09-10 08:49]
127.0.0.1 external edit
Line 1: Line 1:
 +====== Genomgång 9 - Funktioner (referenser och default) ======
  
 <code php> <code php>
 <?php <?php
  
-function thousands($tal = 1) {  // Defaultvärde kan anges.+// Defaultvärde kan anges för en parameter. 
 +// Det används om inget annat skickas till funktionen. 
 +function thousands($tal = 1) {
   return $tal*1000;   return $tal*1000;
 } }