Page 1 of 1

looping....

Posted: Wed May 14, 2008 4:54 am
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...

Re: looping....

Posted: Wed May 14, 2008 5:09 am
by onion2k
What's stopping you?