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 Both sides next revision
amprog_02 [2016-08-24 16:44]
Anders Mosshäll [Anders Genomgång 02 - Inledning PHP]
amprog_02 [2017-08-29 15:30]
Anders Mosshäll
Line 55: Line 55:
   echo $tal4 . '<br />';   echo $tal4 . '<br />';
    
-  $color_array = array('Red','Green','Blue');     // array innehållande tre element +
-  print_r($color_array);                   // skriva ut hela arrayen (bra för programtestning). +
-  echo '<br />'; +
-  echo 'OBS! Första positionen har index 0 och innehåller: '.$color_array[0].'<br />'; +
-  echo 'OBS! Tredje positionen har index 2 och innehåller: '.$color_array[2].'<br />';+
    
   if (false){     // prova: true, false   if (false){     // prova: true, false