html - Put contents of PHP while loop code within a DIV -
so want apply div class these php items. have, know not work, correct trying achieve.
i cant add class each individually, want entire contents within 1 div.
hope makes sense, thanks!
<?php while($campaigns= mysqli_fetch_assoc($result)){ <div class="feeditem">; echo "<div class='field'>".$test['part0']."</div>"; echo "<div class='field'>".$test['part1']."</div>"; echo "<div class='field'>".$test['part2']."</div>"; echo "<div class='field'>".$test['part3']."</div>"; echo "<div class='field'>".$test['part4']."</div>"; echo "<div class='field'>".$test['part5']."</div>"; echo "<div class='field'>".$test['part6']."</div>"; </div>; } ?>
you should use ide gives errors syntax problems... not have html code wrapped in echo "";
statements.
while ($campaigns = mysqli_fetch_assoc($result)) { echo '<div class="feeditem">'; echo "<div class='field'>" . $test['part0'] . "</div>"; echo "<div class='field'>" . $test['part1'] . "</div>"; echo "<div class='field'>" . $test['part2'] . "</div>"; echo "<div class='field'>" . $test['part3'] . "</div>"; echo "<div class='field'>" . $test['part4'] . "</div>"; echo "<div class='field'>" . $test['part5'] . "</div>"; echo "<div class='field'>" . $test['part6'] . "</div>"; echo '</div>'; }
Comments
Post a Comment