note 35111 added to function.preg-replace
| From: | arial at uqg-2000 dot com | Date: | Wed, 20 Aug 2003 03:32:56 +0000 |
| Subject: | note 35111 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54727@lists.php.net to get a copy of this message | ||
I'm having a problem I'm using a flat file using a structure like:
data1|data2|data3|data4
I'm using preg_replace but I can only seem to get it to work with "\t" and not
"|" here's my code I'm using:
preg_split("/\t|\n/", $val);
I've tried:
preg_split("/\||\n/", $val);
But it doesn't work can someone tell me what I'm doing wrong?
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35111
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35111&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35111&report=yes