mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Changed example #2 in preg_replace() to have the arrays initialized before writing to them.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@292327 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6bb56ebdc3
commit
1b6cf34f23
1 changed files with 2 additions and 0 deletions
|
@ -214,9 +214,11 @@ April1,2003
|
|||
<![CDATA[
|
||||
<?php
|
||||
$string = 'The quick brown fox jumped over the lazy dog.';
|
||||
$patterns = array();
|
||||
$patterns[0] = '/quick/';
|
||||
$patterns[1] = '/brown/';
|
||||
$patterns[2] = '/fox/';
|
||||
$replacements = array();
|
||||
$replacements[2] = 'bear';
|
||||
$replacements[1] = 'black';
|
||||
$replacements[0] = 'slow';
|
||||
|
|
Loading…
Reference in a new issue