note 39092 added to function.split

From: Date: Fri, 16 Jan 2004 20:48:41 +0000
Subject: note 39092 added to function.split
Groups: php.notes 
Request: Send a blank email to php-notes+get-63699@lists.php.net to get a copy of this message
I was trying to split a multi-line input from a <TEXTAREA> input using <?php //ver 4.2.2 $lines = split("\n", $multi-line-input); // followed by another split $parts = split(" = ", $each-line ); echo "$parts[1]"; ?> echo was producing an unexpected line break. Tried various ideas from the above feedback, nothing helped (in particular "\\n" was affecting the second split). Eventually, I got rid of the unwanted line-breaks from the echo using <?php $lines = split("[\n\r]", $multi-line-input); ?>. ---- Manual Page -- http://www.php.net/manual/en/function.split.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39092 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39092&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39092&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63699) next »