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

How can i print an array that uses no keys

 
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 -> Smarty Development
View previous topic :: View next topic  
Author Message
pamanes7
Smarty n00b


Joined: 15 Jan 2005
Posts: 1
Location: Mexico

PostPosted: Sat Jan 15, 2005 6:52 pm    Post subject: How can i print an array that uses no keys Reply with quote

HELLO !
i am new with this template engine.

this is the main problem:
in the php file i got this:
$myarray = array('one','two',blue','black');


how can i make a loop over the array to print the values in the template ?
i saw the code to print an associative array ( arrays like 'name' => 'value') but am not using that kind of arrays.

thanks for the help !
_________________
"To deny our own impulses is to deny the very thing that makes us human"
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Sat Jan 15, 2005 7:01 pm    Post subject: Reply with quote

That array does have keys, starting with zero.

http://smarty.php.net/manual/en/language.function.section.php
Back to top
View user's profile Send private message Visit poster's website
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 -> Smarty Development 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