Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

78 users online



Disableing "\r" parsing

Disableing "\r" parsing

Currently viewing this thread: 1 (0 members and 1 guests)


ex60

ex60

Wanna-b PS Expert
Status: Offline!

Disableing "\r" parsing

Ok well I'm creating a text file using the fopen command and I have "\r"'s in the text file that have to be left alone. But i can't seem to figure out how to keep the php parser from getting rid of it.

Any way i can fix my small problem?

Rad

Rad

thinking of something witty to put here
Status: Offline!

As in you want the text '\r' to be displayed literally?

PHP:

<?php

$str 
str_replace("\r""\\\r"$str);

?>

Last edited by Rad, June 3rd, 2004 05:01 AM (Edited 1 times)

ex60

ex60

Wanna-b PS Expert
Status: Offline!

I'll try that but i doubt it will work...since i have to write to the file...thats when it will remove the \r's

BigToach

BigToach

Neversidian
Status: Offline!

try this if that doesnt work as well
str_replace('\r',"\r",$str);

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

Rad

Rad

thinking of something witty to put here
Status: Offline!

Sorry, fixed the code. vBB screws up backslashes...

ex60

ex60

Wanna-b PS Expert
Status: Offline!

thanks! I can't believe i forgot about the double "\"'s

It works fine now Smile

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0073 seconds.