How to restrict who may read my entries?
[SMARTY] Newbie question on iterating through arrays
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PHP web-programming > [SMARTY] Newbie question on iterating through arrays 27 May 2002 18:07:31

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

[SMARTY] Newbie question on iterating through arrays

Rich Gray 27 May 2002 18:07:31
 I'm just starting to play around with Smarty and I want to build a page from
an associative array retrieved from a database...

What's the general consensus of the best/easiest way to go about it?

section/foreach/inc­lude_php ???

TIA
Rich


--
Smarty General Mailing List (http://smarty.php.­net/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Craig 27 May 2002 18:07:31 permanent link ]
 It depends on what you are trying to achieve, but I find that foreach is the
simplest way to iterate through an array in your templates. If you need more
functionality, use section. Using include_php is really for something
altogether different.

Check out the documentation, for details on the features of using section to
see if that will work better for your needs than using foreach.

Craig


On Monday 27 May 2002 09:22 am, Rich Gray wrote:> I'm just starting to play around with Smarty and I want to build a page> from an associative array retrieved from a database...>
What's the general consensus of the best/easiest way to go about it?>
section/foreach/inc­lude_php ???>
Rich

--
Smarty General Mailing List (http://smarty.php.­net/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > PHP web-programming > [SMARTY] Newbie question on iterating through arrays 27 May 2002 18:07:31

see also:
Extedning Core Types
Re: Setup wizard will not complete…
AW: OpenCMS Beta 2 - default template
пройди тесты:
see also:
...
.:Foreword:.

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .