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.