Somebody explain me this please, cause i'm loosing my mind:
Code No.1 doesn't give me no output, but code No. 2 does. Why???????
Code:
function ureditev_tabele($rezultat) {
echo "<table>";
while ($i < mysql_num_fields($rezultat)) {
$ime=mysql_fetch_field($rezultat,$i);
if (isset($HTTP_POST_VARS[$ime->name])) {
printf("<tr><td>%s</td></tr>",$ime->name);
}
$i++;
echo "</table>";
}
ureditev_tabele($rezultat);
Code:
echo "<table>";
while ($i < mysql_num_fields($rezultat)) {
$ime=mysql_fetch_field($rezultat,$i);
if (isset($HTTP_POST_VARS[$ime->name])) {
printf("<tr><td>%s</td></tr>",$ime->name);
}
$i++;
echo "</table>";
Code No.1 doesn't give me no output, but code No. 2 does. Why???????