title: json_encode get values foreach object
body: <p>Hello I can't figure out how to loop through this json encoded array and for each object, get all its values. I need each value as a variable for itself. </p>
  
  <pre><code>echo json_encode($formulars);
  </code></pre>
  
  <p>This is what i get when i echo it out </p>
  
  <pre><code>[{"project_name":"polle","type":"support","title":"vi","reason":"prover","solution":"igen","comments":"okay ","date_stamp":"2013-08-20 14:06:37","used_time":132},{"project_name":"dolla","type":"support","title":"lolol","reason":"skl","solution":"dskal","comments":"kflafda ","date_stamp":"2013-08-20 14:11:36","used_time":210},{"project_name":"polle","type":"fejl","title":"lol","reason":"aksdl","solution":"fdjks","comments":"djsks ","date_stamp":"2013-08-20 14:13:27","used_time":1230}]
  </code></pre>
  
  <p>I have tried this piece of code and I managed to get out the project_name from the first object and that's it: </p>
  
  <pre><code>foreach ($formulars as $current =&gt; $project_name) {
          $project_name['project_name'];
  
      }
  </code></pre>
  
  <p>So is there any way i can get all the variables for each object in my array instead of just the project_name?  </p>
  
  <p>Like this: </p>
  
  <pre><code>foreach ($formulars as $current){ 
      $projectName = $current['project_name'];
      $type = $current['type'];
      $reason = $current['reason'];
  
  }
  </code></pre>
  
  <p>Thanks in advance</p>