Hi
I'm so confused about use of php loop inside body in CC.
if I use loop (eg for) outside of <tr> tag it double repeats everything.if i use loop inside <td> tag in table it repeats all fields in each row instead of assign each value to corresponded row.
what's the solution?
do lot nhap khau, annie, do boi nu, thoi trang tre em, thoi trang be trai, do dung cho me sau sinh, thoi trang cong so, vay lien cong so, ban buon quan ao, do lot[/url]
this is my code.
I'm so confused about use of php loop inside body in CC.
if I use loop (eg for) outside of <tr> tag it double repeats everything.if i use loop inside <td> tag in table it repeats all fields in each row instead of assign each value to corresponded row.
what's the solution?
do lot nhap khau, annie, do boi nu, thoi trang tre em, thoi trang be trai, do dung cho me sau sinh, thoi trang cong so, vay lien cong so, ban buon quan ao, do lot[/url]
this is my code.
<?php
$db = mysql_connect("localhost", "joomla", "123456");
mysql_select_db('joomla');
$query="select distinct(cf_id),tip,HG from jos_chronoforms_betslip ";
$result = mysql_query($query);
$num = mysql_num_rows($result);
?>
<tr dir='ltr'>
<td>{cat}</td>
<td>{recordtime}</td>
<td>{game}</td>
<td>
<?php
for($i = 0; $i < $num; $i ++)
{
$t_rows = mysql_fetch_row($result);
if ( $t_rows[2]=='1')
{
echo "{host}";
} else {
echo "{guest}";
}
}
?>
</td>
<td>{tip}</td>
<td>{win}</td>
<td>{loss}</td>
<td>{ex1}</td>
<td>{odd}</td>
<td>
<?php
echo $t_rows[10];
/*
if ( $t_rows[10]=='full' || $t_rows[10]=='Over/Under')
{
echo "{ftga}-{ftgb}";
} else {
echo "{htga}-{htgb}";
}
*/
?>
</td>
<td>{stats}</td>
</tr>