|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
miguelangelss4 Smarty n00b
Joined: 11 Jun 2012 Posts: 2
|
Posted: Mon Jun 11, 2012 11:09 am Post subject: ¿Hay forma de sacar por pantalla la esctructura de un array? |
|
|
Hola, buenas.
Pues eso, estoy intentando sacar un dato así:
Code: | <h1>{$product->name}</h1> |
Y lo que me imprime es "Array" así que se me ha ocurrido intentar sacar la estructura del array para ver si los datos se están pasando bien y cómo sacarlos por pantalla.
Algo parecido a este código PHP:
Code: |
echo("<pre>");
print_r($array);
echo("</pre>");
|
Saludos, gracias |
|
Back to top |
|
Aristophan Smarty Regular
Joined: 10 Jan 2011 Posts: 96
|
Posted: Mon Jun 11, 2012 11:12 am Post subject: |
|
|
???
<pre>{$array|print_r}</pre>
|
|
Back to top |
|
miguelangelss4 Smarty n00b
Joined: 11 Jun 2012 Posts: 2
|
Posted: Mon Jun 11, 2012 11:17 am Post subject: |
|
|
Perfecto gracias. No se me había ocurrido pensar algo tan simple...
He empezado hace nada en Smarty y no encuentro nada, tengo que aprender a base de código de otros y me está costando.
Gracias! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|