You are here: String Manipulation Question « All PHP « IT news, forums, messages
String Manipulation Question

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация