Advertisement
lokusteek

Old nested

Apr 27th, 2011
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. $result = $cl->Query($q);
  2. if ($result === false) {
  3.     echo "Query failed: " . $cl->GetLastError() . ".\n"; //
  4. } else {
  5.     if ($cl->GetLastWarning()) {
  6.         echo "WARNING: " . $cl->GetLastWarning() . ";"; //
  7.    
  8.     }
  9.     $count = 0;
  10.     if (!empty($result["matches"])) {
  11.         foreach ($result["matches"] as $product => $info) {
  12.             $count++;
  13.             echo $count . " - ";
  14.             //echo $product;
  15.             echo "id is: ".$info["attrs"]["data_id"];
  16.             echo "; type is: " . $info["attrs"]["type"] . "<br/>";
  17.             //echo "<pre>";
  18.             //print_r($info);
  19.             echo "</pre>";
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement