title: SLIM PHP API Post - Parsing JSON array of objects
body: <p>I have route in SLIM PHP Framework:
  <code>app-&gt;post('/details', 'addDetail')</code>;</p>
  
  <p>then I trying to loop in AddDetail function over this JSON:</p>
  
  <pre><code>[{"sessionid":"65656367","action":"tst1","argument":"test2"},{"sessionid":"23123154","action":"trololo","argument":"test6"}]
  </code></pre>
  
  <p>And add each object to mysql db. But when I using any loop then I get error in response:</p>
  
  <pre><code>[internal function]: addDetail()
  C:\Apache24\htdocs\tc\api\Slim\Route.php(392): call_user_func_array('addDetail', Array)
  C:\Apache24\htdocs\tc\api\Slim\Slim.php(1052): Slim_Route-&gt;dispatch()
  C:\Apache24\htdocs\tc\api\index.php(12): Slim-&gt;run()
  </code></pre>
  
  <p><strong>So... How to parse json array of objects and add them through PHP Slim Framework?</strong></p>
  
  <p>Of course when I have just one object in JSON, then all works perfect.</p>