Reply to Re: Sorting an Array - CSORT

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация