php post are not showing on editing page but in phpmyadmin

  blogs, php, post

I have here my if else statement

<?php if (empty($posts)): ?>
                <h1 style="text-align: center; margin-top: 20px;">No posts in the database.</h1>
            <?php else: ?>

and its looking if there are posts in the database and if its showing and if not its says no posts… but somehow its saying no post but there are post and I can only see them in my database in phpmyadmin so any suggest or should I show the whole or a specific part of the code?
thank you!

Source: Ask PHP