cvs: phpdoc /en/reference/pcre/functions preg-split.xml

From: Date: Fri, 11 Jul 2003 19:45:00 +0000
Subject: cvs: phpdoc /en/reference/pcre/functions preg-split.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969355140@lists.php.net to get a copy of this message
darvina Fri Jul 11 15:45:00 2003 EDT Modified files: /phpdoc/en/reference/pcre/functions preg-split.xml Log: Added php tags in the examples Index: phpdoc/en/reference/pcre/functions/preg-split.xml diff -u phpdoc/en/reference/pcre/functions/preg-split.xml:1.6 phpdoc/en/reference/pcre/functions/preg-split.xml:1.7 --- phpdoc/en/reference/pcre/functions/preg-split.xml:1.6 Mon Jun 16 16:03:02 2003 +++ phpdoc/en/reference/pcre/functions/preg-split.xml Fri Jul 11 15:45:00 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 --> <refentry id="function.preg-split"> <refnamediv> @@ -71,9 +71,11 @@ <title><function>preg_split</function> example : Get the parts of a search string</title> <programlisting role="php"> <![CDATA[ +<?php // split the phrase by any number of commas or space characters, // which include " ", \r, \t, \n and \f $keywords = preg_split ("/[\s,]+/", "hypertext language, programming"); +?> ]]> </programlisting> </example> @@ -83,9 +85,11 @@ <title>Splitting a string into component characters</title> <programlisting role="php"> <![CDATA[ +<?php $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); +?> ]]> </programlisting> </example> @@ -95,9 +99,11 @@ <title>Splitting a string into matches and their offsets</title> <programlisting role="php"> <![CDATA[ +<?php $str = 'hypertext language programming'; $chars = preg_split('/ /', $str, -1, PREG_SPLIT_OFFSET_CAPTURE); print_r($chars); +?> ]]> </programlisting> <para>

« previous php.doc (#969355140) next »