note 100509 added to function.preg-replace
| From: | info at brokerfinances dot com | Date: | Wed, 20 Oct 2010 12:14:02 +0000 |
| Subject: | note 100509 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173306@lists.php.net to get a copy of this message | ||
I have a problem with this code:
<?php
$string = 'The quick brown fox jumped over the lazy dog.';
$patterns = array();
$patterns[0] = '/quick/';
$patterns[1] = '/brown/';
$patterns[2] = '/fox/';
.......
$patterns[94] = '/other/';
$replacements = array();
$replacements[0] = 'slow';
$replacements[1] = 'black';
$replacements[2] = 'bear';
.......
$replacements[94] = 'another';
echo preg_replace($patterns, $replacements, $string);
?>
when i have defined from 0 to 94 $patterns and $replacements components all work ok. But when add
the 95 $pattern the php program crash (blank page is returned by the server)
Any body know the solution?
----
Server IP: 190.54.16.132
Probable Submitter: 188.85.98.29
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- https://master.php.net/note/edit/100509
Del: integrated -- https://master.php.net/note/delete/100509/integrated
Del: useless -- https://master.php.net/note/delete/100509/useless
Del: bad code -- https://master.php.net/note/delete/100509/bad+code
Del: spam -- https://master.php.net/note/delete/100509/spam
Del: non-english -- https://master.php.net/note/delete/100509/non-english
Del: in docs -- https://master.php.net/note/delete/100509/in+docs
Del: other reasons-- https://master.php.net/note/delete/100509
Reject -- https://master.php.net/note/reject/100509
Search -- https://master.php.net/manage/user-notes.php