Jump to content

chagos66

New Members
  • Posts

    2
  • Joined

  • Last visited

chagos66's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ah, thanks guys. Got it working now.
  2. I'm trying to get some values from a specifc row of an array. My array has this sort of structure: $places = array( array("name" => "Cabot Cove", "area" => "12", "lat" => "-11.003", "lon" => "-151.2285", "pop" => "17"), array("name" => "Smallville", "area" => "32;", "lat" => "-19.910", "lon" => "-50.205", "pop" => "18"), array("name" => "Gotham City", "area" => "85", "lat" => "-39.9294", "lon" => "-40.199", "pop" => "14"), array("name" => "Springfield", "area" => "21.6", "lat" => "-43.9534", "lon" => "-24.2118", "pop" => "18"), ); If a variable $city is set to "Gotham CIty", for example the url of the page could be "/cities/script.php?city=Gotham+City", how do I look through the array and get the "lat" and "lon" values for just this one $city from the array?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.