title: How to get json decode array value using PHP
body: <p>I need one help.I need to get the json decode value inside foreach loop using PHP. I am explaining my code below.</p>
  
  <pre><code>    $user_qry = "http://oditek.in/takeme/webservice/user2/user_ride_list_v2.php";
  $pstflds="mobile=".$mobile;
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $user_qry);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $pstflds);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $response=curl_exec ($ch);
  $data=json_decode($response,true);
  $bikeArr=$data-&gt;data;
  print_r($bikeArr);exit;
  </code></pre>
  
  <p>Its giving the output like below.</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( [book_id] =&gt; 161117193881 [booking_status] =&gt; 4 [book_date] =&gt; 17-11-2016 [book_time] =&gt; 07:38 PM ) [1] =&gt; stdClass Object ( [book_id] =&gt; 161116183564 [booking_status] =&gt; 4 [book_date] =&gt; 16-11-2016 [book_time] =&gt; 06:35 PM  ) )
  </code></pre>
  
  <p>I need to iterate the above array in foreach loop and get the data.Please help me. </p>