array with variable index: my_array[$i]
Posted: Fri Dec 19, 2003 5:42 pm
hello;
this works:
however this does not:
my conclusion is that I cannot index an array with a variable; any thoughts?
thank you
Shannon Burnett
Asheville NC USA, where the snow don't stick
this works:
Code: Select all
<?php
for ($i = 0 ; $i < count($item_array) ; $i++)
{ $item_parsed_array = explode("=" , $item_array[$i]);
print("$item_parsed_array[0]<br>$item_parsed_array[1]<p>");
?>Code: Select all
<?php
for ($i = 0 ; $i < count($item_array) ; $i++)
{ $item_parsed_array[$i] = explode("=" , $item_array[$i]);
print("$item_parsed_array[$i][0]<br>$item_parsed_array[$i][1]<p>");
?>thank you
Shannon Burnett
Asheville NC USA, where the snow don't stick