preg_split
| From: | Thomas Holton | Date: | Mon, 11 Dec 2000 03:20:55 +0000 |
| Subject: | preg_split | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29626@lists.php.net to get a copy of this message | ||
sorry, the first email had a couple of errors in it, this is the correct
one.
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',$inp[$ix]);
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net