On Fri, 2006-12-29 at 11:42 +0200, Angelo Zanetti wrote:
> Hi all,
> 
> I receive a text file with a whole bunch of strings. and each line is 
> terminated by what I presume is \n\r however when I read the string into 
> PHP, it seems that the last column of the row and the first column of 
> the next row are connected but it appears as a space but I've done all 
> kinds of tests like $spacePos = strrpos($dateAmount, ' '); but this is 
> always empty.
> 
> So is there a way to test for \r\n? or what else can I use to delimit 
> these two values (last column of row and first column of next row)?
> 
> Thanks in advance.

strpos( $dateAmount, "\n" )

or

strpos( $dateAmount, "\r" )

Double quotes are required for expansion of special characters.

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.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to