|
Posted by MattMika on 04/26/06 20:15
Can anyone explain this to me?
$string = "United Parcel Service (1 x 0.55lbs) (Ground):";
$start = strrpos($string, '('); // =36
$end = strrpos($string, ')'); // =43
$editstring = substr($string, $start, $end);// should be strpos 36-43
echo $editstring;
returns - (Ground):
I'm not sure why the colon is showing up. Is there a better way to
extract the shipping type from this string?
Thanks,
Matt Mika
Navigation:
[Reply to this message]
|