Re: [PHP] help with \n\r in strings
- From: robert@xxxxxxxxxxxxx (Robert Cummings)
- Date: Fri, 29 Dec 2006 05:33:07 -0500
On Fri, 2006-12-29 at 11:17 +0100, Frank Arensmeier wrote:
If you just want to test for \n\r -
if ( substr ( -2, $my_string ) == "\n\r" ) { // substr with the
negative value of 2 will give you the last two characters of your string
// do some stuff
}
You have your substr() parameters backwards.
Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
.
- References:
- RE: [PHP] help with \n\r in strings
- From: "Peter Lauri"
- Re: [PHP] help with \n\r in strings
- From: Frank Arensmeier
- RE: [PHP] help with \n\r in strings
- Prev by Date: Re: [PHP] help with \n\r in strings
- Next by Date: Re: [PHP] help with \n\r in strings
- Previous by thread: Re: [PHP] help with \n\r in strings
- Next by thread: Re: [PHP] help with \n\r in strings
- Index(es):