title: php explode is not working well
body: <p>Please help me out with my code. <strong><a href="http://php.net/manual/en/function.explode.php" rel="nofollow">explode()</a></strong> didnt work for me.</p>
  
  <p>What I need is to insert all those seperated words into an array "<code>$traceData</code>" so I can access them by the array index. (<code>$traceData[1]</code>,<code>$traceData[2]</code>...)</p>
  
  <p>My <code>$_GET[allTrace]</code> is:</p>
  
  <p><code>Quality|good|bad|reason\nQuality2|good2|bad2|reason2\nQuality3|good3|bad3|reason3\n</code></p>
  
  <pre><code>$allTrace = explode("\n",$_GET[allTrace]);
  
  foreach ($allTrace as $value) {
  
  $row = explode("|", $value);
  
      foreach($row as $traceData) {
  
          mysqli_query($con,"INSERT INTO trace VALUES (null, '$_COOKIE[user011]', '$traceData[0]', '$traceData[1]','$traceData[2]', $date, '$traceData[3]', '$_GET[page]')"); 
  
      }
  }
  </code></pre>
  
  <p>Thank you.</p>