obaydulbc Trainer 2 years ago |
To create a footer in PHP, you can create a separate file for your footer code and then include it in your PHP pages using the include or require statement. Here is an example of a basic PHP footer design:
<footer class="footer">
<div class="footer-content">
<p>© <?php echo date('Y'); ?> My Website</p>
<nav class="navigation">
<ul>
<li><a href="about.php">About</a></li>
<li><a href="contact.php">Contact</a></li>
</ul>
</nav>
</div>
</footer>
.footer {
background-color: #f0f0f0;
padding: 20px;
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.footer-content p {
margin: 0;
}
.navigation ul {
list-style: none;
margin: 0;
padding: 0;
}
.navigation li {
display: inline-block;
margin-right: 20px;
}
.navigation a {
text-decoration: none;
color: #333;
transition: color 0.3s ease;
}
.navigation a:hover {
color: #666;
}
<?php
include 'footer.php';
?>
Alert message goes here