|
Posted by J.O. Aho on 02/01/07 22:13
comatose wrote:
> If i have a string like this "1234,567.89"
> how can i explode at the COMMA and the PERIOD to get
> $string[0]=1234
> $string[1]=567
> $string[2]=89
This works, but not really best option:
$string=explode('.',ereg_replace(',','.',"1234,567.89"));
Bit unsure about this one:
$string=preg_split("/[,.]/","1234,567.89");
--
//Aho
[Back to original message]
|