Re: [PHP] string function that adds before and after

2004-06-25 Thread Curt Zirzow
* Thus wrote Richard Harb: > -Original Message- > From: Gabe > Sent: Friday, June 25, 2004, 9:06:15 PM > > Philip Olson wrote: > > ... > > I'd say it will do the job just fine if case sensitivity is not an > issue: > > $word = 'weather'; > $new = str_replace($word, "$word", $phrase); >

Re: [PHP] string function that adds before and after

2004-06-25 Thread Richard Harb
-Original Message- From: Gabe Sent: Friday, June 25, 2004, 9:06:15 PM > Philip Olson wrote: >There's a number of functions in PHP that will give me the position of >the *first* instance of the matched string, but it doesn't look like the >function would keep searching after the

Re: [PHP] string function that adds before and after

2004-06-25 Thread Gabe
Philip Olson wrote: There's a number of functions in PHP that will give me the position of the *first* instance of the matched string, but it doesn't look like the function would keep searching after the first match. Anyway, am I overlooking a function that already has the functionality that I'm s

Re: [PHP] string function that adds before and after

2004-06-25 Thread Philip Olson
> >>There's a number of functions in PHP that will give me the position of > >>the *first* instance of the matched string, but it doesn't look like the > >>function would keep searching after the first match. Anyway, am I > >>overlooking a function that already has the functionality that I'm > >>s

Re: [PHP] string function that adds before and after

2004-06-25 Thread Gabe
Matt M. wrote: There's a number of functions in PHP that will give me the position of the *first* instance of the matched string, but it doesn't look like the function would keep searching after the first match. Anyway, am I overlooking a function that already has the functionality that I'm search

Re: [PHP] string function that adds before and after

2004-06-25 Thread Matt M.
> There's a number of functions in PHP that will give me the position of > the *first* instance of the matched string, but it doesn't look like the > function would keep searching after the first match. Anyway, am I > overlooking a function that already has the functionality that I'm > searching f

[PHP] string function that adds before and after

2004-06-25 Thread Gabe
What I'm trying to do is find a substring in a much longer string and insert another string before and after the substring. For example: string to find: weather string to search in: "This is the worst weather ever. Weather around here is terrible." string to add before: string to add after:

[PHP] string function that inserts a char

2004-03-20 Thread Five
I just finished looking through string functions http://us2.php.net/manual/en/ref.strings.php and can't find one that inserts a character, not replaces one. If there's a string that's over 50 chars long without a space, I want to insert a space without replacing or losing any of the original char

Re: [PHP] About php String function

2003-09-24 Thread Eugene Lee
On Thu, Sep 25, 2003 at 10:48:19AM +0530, Uma Shankari T. wrote: : : I am using strpos function for finding the string position in a : particular string .If the string value is equal to zero or greater : than zero some steps to be executed. If the position is empty it is taking : as zero val

Re: [PHP] About php String function

2003-09-24 Thread Tom Rogers
Hi, Thursday, September 25, 2003, 3:18:19 PM, you wrote: UST> Hello, UST> I am using strpos function for finding the string position in a UST> particular string .If the string value is equal to zero or greater UST> than zero some steps to be executed. If the position is empty it is taking

[PHP] About php String function

2003-09-24 Thread Uma Shankari T.
Hello, I am using strpos function for finding the string position in a particular string .If the string value is equal to zero or greater than zero some steps to be executed. If the position is empty it is taking as zero value and executing the steps under equal to zero loop..Is there any

Re: [PHP] String function

2002-11-28 Thread Marco Tabini
You can use strstr: if (strstr ($str, '.')) echo 'Full stop'; else echo 'No full stop'; Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers On Thu, 2002-11-28 at 08:49, Shaun wrote: > Hi, >

[PHP] String function

2002-11-28 Thread Shaun
Hi, Please can someone tell me how i can tell if a string contains a full stop? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php