You do not write it back out to a file. You can process fgetcsv()
from the parsed var you created to do the string replace.
Sincerely,
Mike
--
Mike Brandonisio * Web Hosting
Tech One Illustration * Internet Marketing
tel (630) 759-9283 * e-Commerce
[EMAIL PROTECTED] * http://www.jikometrix.net
JIKOmetrix - Reliable web hosting
On Apr 25, 2006, at 7:02 AM, Jim Byrne wrote:
> Thanks Mike,
>
> Is there an easier way than having to open the file, read the contents
> into a variable and then doing the string replace - then writing the
> content back to a file? Is there anything that allows me to do it by
> just providing the file path?
>
> All the best,
> Jim
>
> --- In [email protected], Mike Brandonisio <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi,
>>
>> You can try doing a string replace on \r or \n.
>>
>> Sincerely,
>> Mike
>> --
>> Mike Brandonisio * Web Hosting
>> Tech One Illustration * Internet Marketing
>> tel (630) 759-9283 * e-Commerce
>> [EMAIL PROTECTED] * http://www.jikometrix.net
>>
>> JIKOmetrix - Reliable web hosting
>>
>>
>> On Apr 25, 2006, at 6:31 AM, Jim Byrne wrote:
>>
>>> Hi,
>>>
>>> I'm using fgetcsv()to import data from a file supplied by my
>>> client -
>>> but unfortunately the content of the file has a carriage return
>>> at the
>>> end which fgetcsv() chokes on, i.e., it doesn't work.
>>>
>>> If I manually delete the carriage return and try to import it works
>>> fine - so how do I delete this carriage return from the file in my
>>> script before using fgetcsv()?
>>>
>>> Thanks.
>>>
>>> All the best,
>>> Jim
>>>
>>>
>>>
>>>
>>>
>>>
>>> The php_mysql group is dedicated to learn more about the PHP/MySQL
>>> web database possibilities through group learning.
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>
>
>
>
>
> The php_mysql group is dedicated to learn more about the PHP/MySQL
> web database possibilities through group learning.
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning.
YAHOO! GROUPS LINKS
- Visit your group "php_mysql" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
