<?php
//
define an array
$myarray[0]
= 'element1';
$myarray[1]
= 'element2';
$myarray[2]
= 'element3';
print_r($myarray);
//print output Array ( [0] => element1 [1] => element2 [2] => element3 )
//print output Array ( [0] => element1 [1] => element2 [2] => element3 )
// OR
// define an array
$myarray[keyname0] = 'element1';
$myarray[
keyname1] = 'element2'; $myarray[
keyname2] = 'element3';
print_r($myarray);
//print output Array ( [0] => element1 [1] => element2 [2] => element3 )
?>
No comments:
Post a Comment