[SOLVED]Replace Carriage Returns?
Posted: Mon Apr 12, 2004 11:06 am
Hello:
I have a variable, $text, that contains some carriage returns:
Line1
Line2
Line3
etc...
What do I do to replace the carriage returns in $text with something that can be sent in the QUERY_STRING? (eg. %20 for space, I dont know what it is for carriage return).
I tried doing it with str_replace, but this doesnt seem to replace anything:
$text = str_replace('\n', '%something', $text);
Thanks,
Peter.
I have a variable, $text, that contains some carriage returns:
Line1
Line2
Line3
etc...
What do I do to replace the carriage returns in $text with something that can be sent in the QUERY_STRING? (eg. %20 for space, I dont know what it is for carriage return).
I tried doing it with str_replace, but this doesnt seem to replace anything:
$text = str_replace('\n', '%something', $text);
Thanks,
Peter.