preg_split
| From: | Thomas Holton | Date: | Mon, 11 Dec 2000 03:16:16 +0000 |
| Subject: | preg_split | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29625@lists.php.net to get a copy of this message | ||
Hi,
I am getting a confusing error message when i try to do the following:
i have a string, read from a file:
1234 <a href="#1234> 4321 </a> e- 1231
it is succesfully read in the var, $inp[$ix] using the file cmd:
$inp = file("infile.txt");
i want to divide this string up into two vars, splitting the string at the
<a tag, like this:
$s_arr = preg_split('<a',$inseq[$ix], 500);
but i get this error:
Warning: No ending delimiter found in /usr/httpd/html/index.php on line 57
i, then tried adding a limit to the string length:
$s_arr = preg_split('<a',$inseq[$ix], 500, PREG_NO_SPLIT_EMPTY);
did not help.
Any ideas?
thanks in advance.