Re: cvs: peardoc /en/package/database/db/db-common getcol.xml
| From: | Mehdi Achour | Date: | Wed, 14 Apr 2004 06:45:31 +0000 |
| Subject: | Re: cvs: peardoc /en/package/database/db/db-common getcol.xml | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-3405@lists.php.net to get a copy of this message | ||
Hi Dan !
It seems that peardoc decided to be more pedantic, so here's a better way to display examples :
This one should be changed to fit this structure : <example> <title>....</title> <programlisting role="xxx"> <![CDATA[ <?php // your code here print_r($foo); ?> ]]> </programlisting> <para> this example will output: </para> <screen> <![CDATA[ Array (<programlisting role="php"> <![CDATA[<?php // Once you have a valid DB object named $db... -$data =& $db->getCol('SELECT name FROM clients'); +$data =& $db->getCol('SELECT cf, df FROM foo'); if (DB::isError($data)) {die($data->getMessage());} +print_r($data); + +/* + * Array + * (+ * [0] => Juan + * [1] => Kyu+ * ) + */ +?>+ ]]>+ </programlisting>
[0] => Juan
[1] => Kyu
)
]]>
</screen>
</example>
Mehdi Achour (back)