Re: [PHP] Re: String manipulation

2010-11-14 Thread Tamara Temple
On Nov 14, 2010, at 4:48 PM, Ron Piggott wrote: Warning: strpos() [function.strpos]: Offset not contained in string Shouldn't you check the length of the string before giving it the offset? From: a...@ashleysheridan.co.uk $pos = (strpos(' ', $string, 76))?strpos(' ',$string, 76):str

Re: [PHP] Re: String manipulation

2010-11-14 Thread Ron Piggott
php.net Subject: Re: [PHP] Re: String manipulation What about something like this: $pos = (strpos(' ', $string, 76))?strpos(' ',$string, 76):strlen($string); Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ron Piggott" Date: Sun, Nov 14,

Re: [PHP] Re: String manipulation

2010-11-14 Thread D. Dante Lorenso
On 11/14/10 2:48 PM, Ron Piggott wrote: How would I write an IF statement that looks for the first space space (“ “) left of the 76th character in a string or, which ever comes first --- OR the end of the string (IE the string is less than 76 characters long? I specifically want is it’s charac

Re: [PHP] Re: String manipulation

2010-11-14 Thread a...@ashleysheridan.co.uk
What about something like this: $pos = (strpos(' ', $string, 76))?strpos(' ',$string, 76):strlen($string); Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Ron Piggott" Date: Sun, Nov 14, 2010 20:48 Subject: [PHP] Re: String manipulati

[PHP] Re: String manipulation

2010-11-14 Thread Ron Piggott
How would I write an IF statement that looks for the first space space (“ “) left of the 76th character in a string or , which ever comes first --- OR the end of the string (IE the string is less than 76 characters long? I specifically want is it’s character position in the string. Ron The Ve

[PHP] Re: String manipulation

2002-10-24 Thread Erwin
"Francisco Vaucher" <[EMAIL PROTECTED]> wrote in message news:3B966ABC166BAF47ACBF4639003B11AC848AE7@;exchange.adtarg.com... > > Hi to all (again ;-) > > I need one or more PHP functions to handle a form input. > > i.e. you write: [EMAIL PROTECTED] > > I have to check that after the '@' comes 'tes