say i had this:
$string = "5+8*10";
$intarray = array ();
$oparray = array ();
i want to know how you would go through the string and add any number and like in whole form in to the $intarray and any operator in the $oparray... so after its done the arrays would be like
$intarray = array(5, 8, 10);
and
$oparray = array("+", "*");
i figure it would be done with regex but i have absolutely no idea how, any basic help would be great.
This is extra, but if you know that would be great as well.
if the string was like "5 + 08 * 010" i would like to know how to make it get rid of the extra spaces and leading zeros