cvs: phpdoc /en/reference/strings/functions explode.xml
| From: | Philip Olson | Date: | Sun, 11 May 2003 17:55:50 +0000 |
| Subject: | cvs: phpdoc /en/reference/strings/functions explode.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969353352@lists.php.net to get a copy of this message | ||
philip Sun May 11 13:55:50 2003 EDT
Modified files:
/phpdoc/en/reference/strings/functions explode.xml
Log:
Expanded the example to print some of the returned values.
Index: phpdoc/en/reference/strings/functions/explode.xml
diff -u phpdoc/en/reference/strings/functions/explode.xml:1.3
phpdoc/en/reference/strings/functions/explode.xml:1.4
--- phpdoc/en/reference/strings/functions/explode.xml:1.3 Sat Mar 29 21:30:50 2003
+++ phpdoc/en/reference/strings/functions/explode.xml Sun May 11 13:55:50 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.explode">
<refnamediv>
@@ -41,11 +41,20 @@
<title><function>explode</function> examples</title>
<programlisting role="php">
<![CDATA[
-$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
+<?php
+// Example 1
+$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
+print $pieces[0]; // piece1
+print $pieces[1]; // piece2
+// Example 2
$data = "foo:*:1023:1000::/home/foo:/bin/sh";
list($user,$pass,$uid,$gid,$gecos,$home,$shell) = explode(":",$data);
+print $user; // foo
+print $pass; // *
+
+?>
]]>
</programlisting>
</example>