I have an array & each holder in the array holds a string in the form:-
1x2x3x4
I want to seperate the numbers from the x's
ie explode("x",$string);
and multiply them together to get one variable for each string in the array!
how to i do it?
Regards,
Sacevoy ~:-)
try: <? $array=array("1x2x3x4","5x6x7x8","9x10x2x4"); foreach($array as $key=>$value) { $new="\$newarray[\$key]=".ereg_replace("x","*",$value).";"; eval($new); } foreach($newarray as $value) echo $value."<br>"; ?>