<HTML ><HEAD ><TITLE >var_export</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual de PHP" HREF="index.html"><LINK REL="UP" TITLE="Funciones sobre variables" HREF="ref.variables.html"><LINK REL="PREVIOUS" TITLE="var_dump" HREF="function.var-dump.html"><LINK REL="NEXT" TITLE="vpopmail functions" HREF="ref.vpopmail.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual de PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.var-dump.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="ref.vpopmail.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.var-export" ></A >var_export</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN78837" ></A ><P > (PHP 4 >= 4.2.0)</P >var_export -- Outputs or returns a string representation of a variable</DIV ><DIV CLASS="refsect1" ><A NAME="AEN78840" ></A ><H2 >Description</H2 >mixed <B CLASS="methodname" >var_export</B > ( mixed expression [, bool return])<BR ></BR ><P > This function returns structured information about the variable that is passed to this function. It is similar to <A HREF="function.var-dump.html" ><B CLASS="function" >var_dump()</B ></A > with the exception that the returned representation is valid PHP code. </P ><P > You can also return the variable representation by using <TT CLASS="constant" ><B >TRUE</B ></TT > as second parameter to this function. </P ><P > Compare <B CLASS="function" >var_export()</B > to <A HREF="function.var-dump.html" ><B CLASS="function" >var_dump()</B ></A >. </P ><P > <DIV CLASS="informalexample" ><A NAME="AEN78859" ></A ><P ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="php" ><pre> <?php $a = array (1, 2, array ("a", "b", "c")); var_export ($a); /* output: array ( 0 => 1, 1 => 2, 2 => array ( 0 => 'a', 1 => 'b', 2 => 'c', ), ) */ $b = 3.1; $v = var_export($b, TRUE); echo $v; /* output: 3.1 */ ?> </pre></PRE ></TD ></TR ></TABLE ><P ></P ></DIV > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.var-dump.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Inicio</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="ref.vpopmail.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >var_dump</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.variables.html" ACCESSKEY="U" >Subir</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >vpopmail functions</TD ></TR ></TABLE ></DIV ></BODY ></HTML >