You are here: Re: Sorting an Array - CSORT « PHP Programming Language « IT news, forums, messages
Re: Sorting an Array - CSORT

Posted by Jerry Stuckle on 11/29/05 02:59

Nel wrote:
> "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.
>
>

Can you post the all code you're having trouble with, instead of just a
couple of lines?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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