Below is a code which gets blogs from the database and displays them in single column on screen, I want to display one or the first post in the first column which will have a bigger text and image than the rest, the second column to have two posts and the third final column having three posts.
A good example would be The New York Times website. How do i go about this?
<?php
$query = "SELECT * FROM posts WHERE tag='us' ORDER BY updated_on DESC";
$run_query = mysqli_query($conn, $query) or die(mysqli_error($conn));
if (mysqli_num_rows($run_query) > 0) {
while ($row = mysqli_fetch_assoc($run_query)) {
$post_title = $row['title'];
$post_id = $row['id'];
$post_author = $row['author'];
$post_date = $row['postdate'];
$post_image = $row['image'];
$post_content = $row['content'];
$post_tags = $row['tag'];
$post_status = $row['status'];
if ($post_status !== 'published') {
echo "NO POST PLS";
} else {
?>
<div class="img">
<img src="allpostpics/<?php echo $post_image; ?>" alt="900 * 300"></a>
</div>
<h3 class="title" size="200" class="column">
<b><span><a href="publicposts.php?post=<?php echo $post_id; ?>"><?php echo $post_title; ?></a></span> <br> <br></b>
<span style="font-weight: normal;"><?php echo substr($post_content, 0, 200) . '.........'; ?> <br></span>
</h3>
<div class="details">
<p>Posted on <?php echo $post_date; ?></p>
<p>By <a href="#"><?php echo $post_author; ?></a></p>
</div>
<?php }}}?>