Differences

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

Link to this comparison view

jfprog_05 [2017-09-01 14:54]
jfprog_05 [2022-07-18 13:20] (current)
Line 1: Line 1:
 +====== Från genomgång ======
 +<code php>
 +<?php
 +// Skapa array
 +// Lägga in data i array
 +// Skriva ut ett värde på en speciell position
 +include('head.php');
 +echo '<pre>';
 +$arr1 = array (
 + 'nr1' => 'Kalle',
 + 2 => 'Anders',
 + 'arr' => array(1,2,3,4),
 +);
 +print_r($arr1);
  
 +//echo $arr1['1'];
 +$i=0;
 +$arr2['34']=13;
 +while($i<10) {
 + $arr2[]=$i*7;
 + $i++;
 +}
 +print_r($arr2);
 +
 +
 +
 +
 +echo '</pre';
 +include('foot.php');
 +</code>