You are here: Output stops after while loop « PHP Programming Language « IT news, forums, messages
Output stops after while loop

Posted by dawnerd on 07/29/06 22:41

Hi, I am developing a CMS and came across something which has never
happened to me before, and I re-wrote the specific script twice, both
differently, and still had the same error.

I'm not sure if it is apache, or php, or just an error I am not seeing.

here is the code:
<?php
/**
* Loop through the resultset
*/
$int = 0;
while( $row = $db->fetcharray( $query ) )
{
if( $int == 0 )
{
$class = "page_table1";
$int++;
}
else
{
$class = "page_table2";
$int = 0;
}

if( $row["type"] == "error" )
{
$img = "emblem-important-small.png";
}
else
{
$img = "text-x-generic.png";
}
?>
<tr class="<?php echo $class; ?>">
<td><a
href="index3.php?page=pagemanager&amp;do=edit&amp;id=<?php echo
$row["id"]; ?>">
<img src="images/emblem-unreadable.png" width="16" height="16"
border="0" /></a></td>
<td><a
href="index3.php?page=pagemanager&amp;do=edit&amp;id=<?php echo
$row["id"]; ?>">
<img src="images/accessories-text-editor.png" alt="Edit" width="16"
height="16" /></a></td>
<td><?php echo $row["id"]; ?></td>
<td><?php echo $row["title"]; ?></td>
<td><?php echo $row["slug"]; ?></td>
<td><img src="images/<?php echo $img; ?>" title="<?php echo
$row["type"]; ?>" style="float:left;" />&nbsp;
<?php echo $row["type"]; ?></td>
</tr>

<?php
}
?>

The output just stops when the while loop is done executing. Any help
would be greatly appreciated.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация