title: split and store into list with an array variable in php
body: <p>I have a number that is get from a web page, such that
  $number=12-34-33-87-54-................ and so on.</p>
  
  <p>$number may have two numbers like $number=12-34
  or
  it may have 3 numbers like $number=12-34-33
  or
  it may have more numbers like $number=12-34-33-87-54-.......... and so on.</p>
  
  <p>I want to split it by '-' and want to store in an array.
  like array(12,34,33,.....)</p>
  
  <p>I used the code given below but it doesn't work.</p>
  
  <pre><code>&lt;?php
  $a=array();
  list($a)=split('-',$number);
  foreach($a as $v)
  {
  echo $v;
  }
  ?&gt;
  </code></pre>
  
  <p>Plz tell me how can i split this?</p>