//var_dump($outputValArr); foreach ($outputValArr as $index => $responseValue) { if (strcmp($outputCatArr[$index], "name") == 0) { $valInd = $index; } if (strcmp($outputCatArr[$index], "displaycontent") == 0) { $descInd = $index; } if (strcmp($outputCatArr[$index], "store") == 0) { //echo 'deeshen'.$outputValArr[$index]; $storeInd = $index; } } if (strcmp($valInd, -1) != 0) { $countofres++; $yelp_resp = getYelp($outputValArr[$valInd], $city); $src = "/images/tr4.jpg"; $jsonIterator = new RecursiveIteratorIterator(new RecursiveArrayIterator(json_decode($yelp_resp, TRUE)), RecursiveIteratorIterator::SELF_FIRST); foreach ($jsonIterator as $key => $val) { if (is_array($val)) { } else { if (strcmp($key, "image_url") == 0) { //$ref=$val; $src = $val; break; } } } ?> <div class="ca-item ca-item-2"> <div class="ca-item-main">
$outputValArr = $res->outputValue; $valInd; $descInd; foreach ($outputValArr as $index => $responseValue) { if (strcmp($outputCatArr[$index], "displaycontent") == 0) { $descInd = $index; break; } } $disp_res = ''; $single = $outputValArr[$descInd]; for ($out = 0; $out < count($single); $out++) { $disp_res = $disp_res . ' ' . $single[$out]; } $content = $disp_res; $yelp_resp = getYelp($term, $city); $src; $rating; $url; $phone; $review; $address; $jsonIterator = new RecursiveIteratorIterator(new RecursiveArrayIterator(json_decode($yelp_resp, TRUE)), RecursiveIteratorIterator::SELF_FIRST); foreach ($jsonIterator as $key => $val) { if (strcmp($key, "image_url") == 0) { $src = $val; } if (strcmp($key, "rating_img_url") == 0) { $rating = $val; } if (strcmp($key, "url") == 0) {