Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

for cicle problem


Go to End


1003 Views

Avatar
bebabeba

Community Member, 193 Posts

24 November 2008 at 11:13pm

Hi!
I have a query that look for in my database and show me 35 results. I want print this result in my page inside a div. My problem is create a for cicle that include div and result of query. can you help me please?How silverstripe convert this:

$array [] //this is the array that include all query result

for($i=0;$i<count($array); $i++){
<div>
print_r($array($i))
</div>
}