Hi,
I found some associative arrays having no keys. I can’t understand the purpose of such arrays. What we call them? How we delete and add elements in such arrays? Kindly explain. I have got an example program below:
<?php
/* associative arrays without keys */
$array1 = array("color"=>"red",2,4);
$array2 = array("a","b","color"=>"green","shape"=>"trapezoid",4);
foreach($array1 as $value)
echo "$value <BR>";
foreach($array2 as $value)
echo "$value <BR>";
?>
I think the blank screen was due to posting from a Tablet and selecting incorrect quotation marks. Try replacing with single or double quotation marks because it does make it a lot easier to see the parameters.