|
Posted by Jimbus on 10/22/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]
|