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 [2015-09-10 08:49]
127.0.0.1 external edit
dvprog_11 [2017-02-27 09:48]
Daniel Viström
Line 14: Line 14:
  */  */
 function summa($tal1, $tal2){ function summa($tal1, $tal2){
 +  $summa = $tal1 + $tal2; 
 +  $tal1 = 1000;  // $tal ändras bara i funktionen.
   $test = 'teststräng';    // $test finns bara i funktionen   $test = 'teststräng';    // $test finns bara i funktionen
   echo $test . '<br />';   echo $test . '<br />';
-  $tal1 = $tal1 + $tal2; +  return $summa;   // Skickar tillbaka svaret.
-  return $tal1;   // Skickar tillbaka svaret.+
 } }
  
Line 70: Line 70:
 // sparas i en variabel. // sparas i en variabel.
 echo strrev('.dlrow olleH'); echo strrev('.dlrow olleH');
-$text = strrev(strtoupper('.dlrow olleH')); +$text='dallas'
-echo $text . '<br />';+$text2=strrev($text); 
 +echo $text2 . '<br />';
  
 $tal1 = 5; $tal1 = 5;