Forum Moderators: coopster

Message Too Old, No Replies

parsing a text string - creating fields

separating text from numbers in a string

         

michlcamp

4:35 pm on Dec 20, 2005 (gmt 0)

10+ Year Member



Because of the nature of a UPS shipping script installed on my site, the value passed from a selected checkbox field in the script is both text and numeric - ex: UPS Ground=11.44

Is there a way to parse the text away from the number so that I could end up with two fields :

$ship_type="UPS Ground"
$shipping="11.44"

?
Any help much appreciated.
thanks in advance.
mc

jatar_k

4:51 pm on Dec 20, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you could just split [php.net] on the =

michlcamp

5:16 pm on Dec 20, 2005 (gmt 0)

10+ Year Member



got it done..thanks