note 76600 deleted from function.str-replace by philip

From: Date: Wed, 07 Oct 2009 08:02:45 +0000
Subject: note 76600 deleted from function.str-replace by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161458@lists.php.net to get a copy of this message
Note Submitter: mjaque at ilkebenson dot com ---- In order to replace carriage return characters from form inputs, if everything else fails, you can try: <?php $new_text = str_replace(chr(13).chr(10), '_', $original_text); ?> And in order to show the line feeds in a javascript alert, you can do: <?php $new_text = str_replace(chr(13).chr(10), '\n', $original_text); ?>

« previous php.notes (#161458) next »