Re: [PHP] \n's
Remember, those functions have return values. Gotta assign the return to a variable! $variable = [replacement_function]($args ... ); They don't change the value of the variable in the argument list, they take that value and put a new value in a new memory space. Unfortunately, they don't throw an error when you don't assign the return to a variable so it can often be hard to catch. Mike Speedboy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... quick problem... I don't seem to be able to strip \n's out of a string of text: str_replace(\n, , $line); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] \n's
Hi all, quick problem... I don't seem to be able to strip \n's out of a string of text: i'm using: ? eregi_replace(\n, , $foo); ? I've also tried: eregi_replace(\\n, , $foo); and eregi_replace(\r, , $foo); with no luck. Am I missing something when using ereg on special characters? Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] \n's
On Tue, 30 Oct 2001 12:00, Justin French wrote: Hi all, quick problem... I don't seem to be able to strip \n's out of a string of text: i'm using: ? eregi_replace(\n, , $foo); ? I've also tried: eregi_replace(\\n, , $foo); and eregi_replace(\r, , $foo); with no luck. Am I missing something when using ereg on special characters? Justin French What about $newfoo = eregi_replace(\n, , $foo); -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Do radioactive cats have 18 half-lives? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] \n's
quick problem... I don't seem to be able to strip \n's out of a string of text: str_replace(\n, , $line); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]