- Clarify the use of "array" here. (Bug #26508)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@145462 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derick Rethans 2003-12-03 14:40:56 +00:00
parent 2464af67f4
commit dd203bae9d

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
<refentry id="function.preg-replace">
<refnamediv>
@ -76,12 +76,12 @@ April1,2003
</para>
<para>
Every parameter to <function>preg_replace</function> (except
<parameter>limit</parameter>) can be an array. When using arrays with
<parameter>pattern</parameter> and <parameter>replacement</parameter>,
the keys are processed in the order they appear in the array. This is
<emphasis>not necessarily</emphasis> the same as the numerical index
order. If you use indexes to identify which
<parameter>pattern</parameter> should be replaced by which
<parameter>limit</parameter>) can be an unidimensional array.
When using arrays with <parameter>pattern</parameter> and
<parameter>replacement</parameter>, the keys are processed in the order
they appear in the array. This is <emphasis>not necessarily</emphasis>
the same as the numerical index order. If you use indexes to identify
which <parameter>pattern</parameter> should be replaced by which
<parameter>replacement</parameter>, you should perform a
<function>ksort</function> on each array prior to calling
<function>preg_replace</function>.