I have a number that is get from a web page, such that $number=12-34-33-87-54-................ and so on.
$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.
I want to split it by '-' and want to store in an array. like array(12,34,33,.....)
I used the code given below but it doesn't work.
<?php
$a=array();
list($a)=split('-',$number);
foreach($a as $v)
{
echo $v;
}
?>
Plz tell me how can i split this?