looping....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Swathimaddipatla
Forum Newbie
Posts: 9
Joined: Fri May 09, 2008 7:08 am

looping....

Post by Swathimaddipatla »

hi folks..

i have some html tags in some variable....like

$string ="<table><tr><td colspan='5' height='3'></td></tr><tr><td bgcolor='#E5ECF9' valign='top'>28.05.2008<BR>Bodø</td><td bgcolor='#E5ECF9' valign='top'><a href='#' onClick='OpenHotel(124);'>Sunway Apart 2 uker</a></td><td bgcolor='#E5ECF9' valign='top'><div align='right'>NOK 3 790</div></td><td bgcolor='#E5ECF9' valign='top'><div align='right'>7<td bgcolor='#E5ECF9' valign='top' nowrap><div align='right'><a href='#' onClick="PostPageT('booayt28.05.2008swa2u','false');"><b><font color=#ff9900>Bestill nå</font></b> &#187;</a><tr><td colspan='5' height='3'></td></tr><tr><td bgcolor='#E5ECF9' valign='top'>28.05.2008<BR>Bodø</td><td bgcolor='#E5ECF9' valign='top'><a href='#' onClick='OpenHotel(32);'>Uzel Hotel 2 uker med frokost </a></td><td bgcolor='#E5ECF9' valign='top'><div align='right'>NOK 3 890</div></td><td bgcolor='#E5ECF9' valign='top'><div align='right'>7<td bgcolor='#E5ECF9' valign='top' nowrap><div align='right'><a href='#' onClick="PostPageT('booayt28.05.2008uze2u','false');"><b><font color=#ff9900>Bestill nå</font></b> &#187;</a>...</table>";

In this <tr> to </a> is repeated for some 20 to 30 no of times...but the data in the table data will varies...

Now the thing is i want to put these tags into a loop...
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: looping....

Post by onion2k »

What's stopping you?
Post Reply