title: Illegal string offset error in PHP
body: <p>I am sending these objects to server to fetch the record and save it. but it is giving me the below given error  </p>
  
  <pre><code>array(3) {
  [0]=&gt;
  array(1) {
      ["answer"]=&gt;
      string(218) "{"id":"19","question_id":"10","answer_text":"Please note that we also maintain you:",  
  "iscorrect":"1",
  "created_at":"2014-06-07 07:52:12",  
  "updated_at":"2014-06-07 07:52:12"}"
    }
    [1]=&gt;
   array(1) {
     ["answer"]=&gt;
      string(218) "{"id":"20","question_id":"10","answer_text":"Please note that we also maintain the following pages and support forums to help you:",  
  "iscorrect":"1",
  "created_at":"2014-06-07 07:52:13",  
  "updated_at":"2014-06-07 07:52:13"}"
   }
  [2]=&gt;
  array(1) {
    ["answer"]=&gt;
    string(218) "{"id":"21","question_id":"10",  
    "answer_text":"Please note that we also maintain the following pages and support forums to help you:","iscorrect":"0","created_at":"2014-06-07 07:52:13","updated_at":"2014-06-07 07:52:13"}"
  }
  }
  
  {"error":{"type":"ErrorException","message":"Illegal string offset     'id'","file":"\/home\/learnomatics\/laravel\/mobillz_mlmalp\/app\/controllers\/QuizController.php","line":379}}
  </code></pre>
  
  <p>I am trying to get the values like   </p>
  
  <pre><code>$answers=Input::get('answers');
  var_dump($answers);
  foreach ($answers as $answer) {
      if(isset($answer['answer'])){
          quiz_que_ans_id=$answer['answer']['id'];
  }
  }
  </code></pre>