Example 1
<?php
$a=array("a"=>"Dog","b"=>"Cat","c"=>"Horse");
print_r($a);
?>
$a=array("a"=>"Dog","b"=>"Cat","c"=>"Horse");
print_r($a);
?>
The output of the code above will be:
Array ( [a] => Dog [b] => Cat [c] => Horse )
Example 2
<?php
$a=array("Dog","Cat","Horse");
print_r($a);
?>
$a=array("Dog","Cat","Horse");
print_r($a);
?>
The output of the code above will be:
Array ( [0] => Dog [1] => Cat [2] => Horse )
No comments:
Post a Comment