...

View Full Version : Substr help



Crisp
10-23-2009, 07:25 PM
Hey,
I would like substr to take off the first 3 characters off of a string.
Example:
RE: Blah Blah
Would be: Blah Blah
Can someone help me?
Thanks.
EDIT:
Ok I fixed it.

oracleguy
10-23-2009, 07:35 PM
Use the start and length parameters

Example:

$some_string = substr("Blah Blah", 0, 3);

ksduded
10-23-2009, 07:40 PM
I had a similar question.

I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the word CATEGORY: leaving only ITEM inside the string....

In case the string does not have CATEGORY: before listing the ITEM then nothing happens...

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum