title: How to split the string which is separted by a pipe
body: <p>I have a string which contains a number of records and I want to split each record after || and each record is again separated by ~ symbol .when I am trying these I am getting the only first record not all the records.can you please help me out in this problem</p>
  
  <pre><code>$data="promo~919441188673,9959045~2015-03-16~4:39 pm~ arey sollu shobhan gaa neeku pani ledaaa~Invalid Number||promo~919959095474~2015-03-16~4:40 pm~ Hi ra...how are you......~Message Sent||promo~919441188673~2015-03-13~3:51 pm~ Hi,This is from bhash sms ,and this is testing sorry for the ~Delivered";
  
  list($someCode)=explode('||', $data);
  //var_dump($data);
  //var_dump($someCode);
  
  
      list($type,$num,$date,$time,$msg,$status)=explode('~', $someCode);
  
  var_dump($type);
  var_dump($num);
  var_dump($date);
  var_dump($time);
  var_dump($msg);
  var_dump($status);
  </code></pre>