Süper Üye
Merhaba arkadaşlar ben web sitesi tasarlamayı öğreniyorum fakat şunu beceremedim yardım edebilirseniz çok sevinirim
Şimdi konular bende böyle tekerli tekerli çıkıyor ben bunların 1 satırda 2 post çıksın istiyorum yani şöyle
Kullandığım php kodu
Şimdi konular bende böyle tekerli tekerli çıkıyor ben bunların 1 satırda 2 post çıksın istiyorum yani şöyle
Kullandığım php kodu
PHP:
<!-- Content -->
<div class="content clearfix">
<!-- Main Content -->
<div class="main-content">
<h1 class="recent-post-title"><?php echo $postsTitle ?></h1>
<?php foreach ($posts as $post): ?>
<div class="post clearfix">
<img src="<?php echo BASE_URL . '/assets/images/' . $post['image']; ?>" alt="" class="post-image">
<div class="post-preview">
<h2><a href="single.php?id=<?php echo $post['id']; ?>"><?php echo $post['title']; ?></a></h2>
<i class="far fa-calendar"> <?php echo date('F j, Y', strtotime($post['created_at'])); ?></i>
</div>
</div>
<?php endforeach; ?>
</div>
<!-- // Main Content -->