Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

¿Hay forma de sacar por pantalla la esctructura de un array?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish
View previous topic :: View next topic  
Author Message
miguelangelss4
Smarty n00b


Joined: 11 Jun 2012
Posts: 2

PostPosted: Mon Jun 11, 2012 11:09 am    Post subject: ¿Hay forma de sacar por pantalla la esctructura de un array? Reply with quote

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
View user's profile Send private message
Aristophan
Smarty Regular


Joined: 10 Jan 2011
Posts: 96

PostPosted: Mon Jun 11, 2012 11:12 am    Post subject: Reply with quote

???
<pre>{$array|print_r}</pre>
Wink
Back to top
View user's profile Send private message
miguelangelss4
Smarty n00b


Joined: 11 Jun 2012
Posts: 2

PostPosted: Mon Jun 11, 2012 11:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Spanish All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP