Contoh kode PHP untuk mengacak data dari Facebook Json data :
$json_string = file_get_contents("https://graph.facebook.com/v2.5/search?q=iklan&type=page&access_token=".$access_token);
$parsed_json = json_decode($json_string, true);
$jsonArr = $parsed_json['data'];
$rand_array_key = array_rand($jsonArr);
echo $jsonArr[$rand_array_key]['id'];
//ATAU
$rand_array_key = $jsonArr[rand(0, count($jsonArr) - 1)];
echo $rand_array_key['id'];
Smoga bermanfaat......!
ConversionConversion EmoticonEmoticon