<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.vsprintf"> <refnamediv> <refname>vsprintf</refname> <refpurpose>Return a formatted string</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>vsprintf</methodname> <methodparam><type>string</type><parameter>format</parameter></methodparam> <methodparam><type>array</type><parameter>args</parameter></methodparam> </methodsynopsis> <para> Operates as <function>sprintf</function> but accepts an array of arguments, rather than a variable number of arguments. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>format</parameter></term> <listitem> <para> See <function>sprintf</function> for a description of <parameter>format</parameter>. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>args</parameter></term> <listitem> <para> </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Return array values as a formatted string according to <parameter>format</parameter> (which is described in the documentation for <function>sprintf</function>). </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>vsprintf</function>: zero-padded integers</title> <programlisting role="php"> <![CDATA[ <?php print vsprintf("%04d-%02d-%02d", explode('-', '1988-8-1')); // 1988-08-01 ?> ]]> </programlisting> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>sprintf</function></member> <member><function>vprintf</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->