svn: /phpdoc/en/trunk/reference/datetime/datetime/ modify.xml

From: Date: Sun, 25 Apr 2010 15:55:43 +0000
Subject: svn: /phpdoc/en/trunk/reference/datetime/datetime/ modify.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6468@lists.php.net to get a copy of this message
danielc Sun, 25 Apr 2010 15:55:43 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=298519 Log: Add procedural example (to demonstrate the docbook format I am proposing on php-doc list). Changed paths: U phpdoc/en/trunk/reference/datetime/datetime/modify.xml Modified: phpdoc/en/trunk/reference/datetime/datetime/modify.xml =================================================================== --- phpdoc/en/trunk/reference/datetime/datetime/modify.xml 2010-04-25 15:48:58 UTC (rev 298518) +++ phpdoc/en/trunk/reference/datetime/datetime/modify.xml 2010-04-25 15:55:43 UTC (rev 298519) @@ -68,7 +68,8 @@ <refsect1 role="examples"> &reftitle.examples; <example> - <title>A <function>date_modify</function> example</title> + <title><function>DateTime::modify</function> example</title> + <para>&style.oop;</para> <programlisting role="php"> <![CDATA[ <?php @@ -78,7 +79,17 @@ ?> ]]> </programlisting> - &example.outputs; + <para>&style.procedural;</para> + <programlisting role="php"> +<![CDATA[ +<?php +$date = date_create('2006-12-12'); +date_modify($date, '+1 day'); +echo date_format($date, 'Y-m-d'); +?> +]]> + </programlisting> + &examples.outputs; <screen> <![CDATA[ 2006-12-13

« previous php.doc.cvs (#6468) next »