You are here: Re: ARRAY - straightforward question? « PHP Programming Language « IT news, forums, messages
Re: ARRAY - straightforward question?

Posted by Jimbus on 10/13/11 11:46

> Thanks, my coordinates are currently split into "latitude" and "longitude"
> cols, although I will also be soon using the geospatial functionality in
> mysql. (Geomotry Point etc).
>
> So, should I be looking to do something like this ... ?
>
> while($row = mysql_fetch_assoc($result)) {
> $data[ $row['longitude'].$row['latitude'] ][] = $row['bizname'];
> }

That's how I'd do it... concatenating the lat and long. Someone else replied
with a 3D array solution, which might be better in terms of speed. Not sure
about that though.

Anyone have an analysis of which would be faster? A longer array key vs. a
3D array.

 

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

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