Trying to print posts from database using While loop, Not able to wrap all posts in single DIV tag.
Code:
<?php
$sql="select posts from coder where 1=1 ";
$result= mysql_query($sql);
while($row=mysql_fetch_array($result))
{
?>
<div> -------- Wrapper DIV Starts
<span><?php echo $row['1']; ?></span> ------ loop and print all post inside Wrapper DIV
</div> -------- Wrapper DIV Ends
<?php } ?>
Need the Output to be:
<div>
posts
posts
posts
posts
</div>
Please try this
I hope it helps you