|
Posted by Steve on 09/24/07 21:15
"Vik Rubenfeld" <vikr@mindspring.com.invalid> wrote in message
news:vikr-654091.14030624092007@earthlink.vsrv-sjc.supernews.net...
>I got it figured out. I was reading in the string I was using for the
> index, from a CSV file, and it came in with the double-quotes still
> around it. So instead of accessing $array[1001], I was accessing
> $array["1001"].
either way, i always suggest using foreach constructs for iteration since
that makes this problem disappear...and, should a key/index be unset/missing
in your array, foreach won't blow up and iterate over all elements, rather
than the ones you 'think' should be there.
but that could just be me and my 0.02 usd.
[Back to original message]
|