Answer the question
In order to leave comments, you need to log in
Why is it only showing one line?
Why is only one line displayed from the database, but I have eight of them.
<?php
$connect1 = new mysqli("localhost", "root", "root", "firecode");
$connect1_title = $connect1->query("SELECT * FROM `articles`");
$connect1_title = $connectt1_title->fetch_assoc();
foreach ($connect1_title as $comment){ ?>
<p class="article-style-title"><?= $comment;?></p> <br>
<? }?>
Answer the question
In order to leave comments, you need to log in
<?php
$connect1 = new mysqli("localhost", "root", "root", "firecode");
$connect1_title = $connect1->query("SELECT * FROM `articles`");
while($comment = $connect1_title->fetch_assoc())
{
print_r($comment);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question