Posted by Nel on 11/28/05 23:09
"Ewoud Dronkert" <firstname@lastname.net.invalid> wrote in message
news:42rmo1pqlo1isau2gsjdjvqrhikkg5onmi@4ax.com...
> Nel wrote:
>> error on the line
>>
>> foreach($array as $row) {
>>
>> Not sure why?
>
> From the FM at http://php.net/foreach : "foreach works only on arrays, and
> will issue an error when you try to use it on a variable with a different
> data type or an uninitialized variable."
>
> --
> E. Dronkert
Thanks - I have the routine working but it doesn't do what I need.
I am trying to sort a multi-dimentional(?) array returned from mysql (i.e.
rows of data) based upon a calculation.
get result from mysql
sort through and calculate $distance($id) for each store, then sort the
result according to distance ASC.
list stores in order.
[Back to original message]
|