vernon wrote:
I think that maybe I should explain the fist Zip comes from a session, here I've defined the variable. I use the caluation in the code to get the distance and then loop the recordset so that the distance is created each time the record loops through. I have taken many things from the file and am only looking for what we discussed, to sort the records by distance.

I see. When you have a collection of items, the best place to put them is in an array. I assumed that you were going to be putting them into an array anyway, so my solution simply explained a different way of putting them into an array so that you would easily be able to determine the distance if given any element in the array.


There might be ways to solve your problem without using arrays, but I wouldn't waste any time investigating them. Use arrays for this, that's why they exist.

I've CC'd this back onto the list since this kind of discussion can be helpful for others who are learning too.


Erik



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to