Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
dvprog_11 [2020-02-10 11:16]
Daniel Viström
dvprog_11 [2020-05-07 13:26]
Daniel Viström
Line 95: Line 95:
 $y = 6; $y = 6;
 // Variablerna behöver inte ha samma namn som i funktionen.  // Variablerna behöver inte ha samma namn som i funktionen. 
-$sum = summa($x, $y) . '<br>';+$sum = summa($x, $y);
 echo $sum . '<br>';    // 10 skrivs ut. echo $sum . '<br>';    // 10 skrivs ut.
  
Line 132: Line 132:
  */  */
 function array_first($arr){ function array_first($arr){
-    $answer = "";+    $answer = '';
     $i = 0;     $i = 0;
     while($i < count($arr)){     while($i < count($arr)){