note 39092 deleted from function.split by tomsommer
| From: | tomsommer@php.net | Date: | Tue, 06 Jul 2004 09:13:40 +0000 |
| Subject: | note 39092 deleted from function.split by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72727@lists.php.net to get a copy of this message | ||
Note Submitter: HarryXpannu+com
----
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); ?>.