Register Members List Search Today's Posts Mark Forums Read

 
 
Mod Options
  #1  
Old 07 Apr 2002, 20:37
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Real name: Dan
help with loops

OK i have a few large looks that call data *duh* but what I have the problem doing id getting it into a template.. do you know if this is possiable?
Comments
  #2  
Old 08 Apr 2002, 08:25
Gimp Gimp is offline
 
Join Date: Nov 2001
uhh?
rephrase
  #3  
Old 08 Apr 2002, 08:56
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
I didnt get the question either.
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
I do NOT do custom work, so please do not PM/email me for such projects. Thanks for understanding..
  #4  
Old 12 Apr 2002, 23:23
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Real name: Dan
Errr... What I mean to say *not being drunk* Is how would I take information for loops. That calls data from a database and prints it to the screen. I would leik to be able to take that data and put it in a template but every time I try I always get the last piece of data it calls.. example:

Bill
Bob
John
Sam

with would be the output of the loop from each row it finds.. but how would I get the it to show all of them in a template?
  #5  
Old 16 Apr 2002, 11:52
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
when you get the data from db, append it to a variable. eg.

($count stands for the number of data you got from db., $retrieved_from_db is an array that keeps the retrieved data)

for ($i=0;$i<$count; $i++)
{
$compiling_data.=$retrieved_from_db[$i];
}

When this loop ends, you will have all the retrieved data in your variable "$compiling_data". Now you can use this in your template..
__________________
Logician's Blog | WebTemplates for vb 4.x : VB Integrated Content Management System
I do NOT do custom work, so please do not PM/email me for such projects. Thanks for understanding..
  #6  
Old 17 Apr 2002, 06:06
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Real name: Dan
Yeah I got it.. I was being dumb and I used the sprintf to help me along with things
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 11:08.

Layout Options | Width: Wide Color: