Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
dvprog_12 [2013-04-15 14:16] Daniel Viström created |
dvprog_12 [2013-04-15 14:18] Daniel Viström |
||
---|---|---|---|
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; | ||
} | } |