View Single Post
Old 01-13-2013, 12:32 AM   PM User | #2
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
You are using var_dump all wrong...Just use plain assignment(or Output buffering which is unnecessary in this case).

PHP Code:
$name$geoloc['results'][0]['geometry']['name'];
$types$geoloc['results'][0]['geometry']['types'];
$vicinity$geoloc['results'][0]['geometry']['types']; 
Okay. Try some debugging.

First, make sure that the cURL function is returning data. Place this code below $geoloc = json_decode(curl_exec($ch), true); Then post the results here.

PHP Code:
echo "<pre>";

print_r($geoloc);

echo 
"</pre>"
And make use of PHP /PHP tags and put your PHP code between them - there's even a button that does that....its mighty hard to read code like plaintext.
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk

Last edited by Redcoder; 01-13-2013 at 12:43 AM..
Redcoder is offline   Reply With Quote