I think I\'ve found where the error lies:
$convertJSON = file_get_contents(\"http://www.google.com/ig/calculator?hl=en&q=\" . $currencyValue . $curre
to make json_encode workable, you have to add double quote to the result string in order to make it in JSON format.
I tries the simple code below , and it works fine:
$data = '{lhs: "1 U.S. dollar",rhs: "7.80177256 Hong Kong dollars",error: "",icc: true}';
$data = str_replace('lhs','"lhs"',$data);
$data = str_replace('rhs','"rhs"',$data);
$data = str_replace('error','"error"',$data);
$data = str_replace('icc','"icc"',$data);
print_r(json_decode($data));
stdClass Object ( [lhs] => 1 U.S. dollar [rhs] => 7.80177256 Hong Kong dollars [error] => [icc] => 1 )
Now it is in json_decode object!