$result = mysql_query($sql); while ($campaigns = mysql_fetch_array($result)) { $campaign = new class_campaigns($campaigns[unique]); ?> <div class="box list" id="<?php echo $campaign->get_unique(); ?> "> <table width="100%" border="0"> <tr> <td width="52%"><strong><?php echo $campaign->get_name(); ?> </strong></td> <td width="18%" class="<?php echo $campaign->get_status(); ?> none"><?php if ($campaign->get_valid() == 1 || $campaign->get_valid() == 2) { ?> <input type="checkbox" class="switcher" id="c<?php echo $campaign->get_unique(); ?> " <?php if ($campaign->get_valid() == 1) { echo "checked"; } ?> /><?php } else { echo "<span>" . $campaign->get_status() . "</span>";