Jump to content

mysqli_fetch_array question


dazzclub

Recommended Posts

I trying to retrieve a row of data from my table using this code

 

<?php
$q ="SELECT * FROM press_material ORDER BY id";
if($return = mysqli_query($dbc, $q)) {

while($row = mysqli_fetch_array($return, MYSQLI_ASSOC))


$publication = $row['publication'];
$date = $row['date'];
$content = $row['content'];
}
?>

 

and im using this html code to display it

 

<p>|<?php echo $publication; ?></p>
<p><?php echo $date; ?> </p>
<p><?php echo $content; ?></p>

 

The problem is that it seems to display one row, which will $publication and it ignores the rest.

 

Can any one point me in the right direction please?

 

cheers

Darren

Link to comment
https://forums.phpfreaks.com/topic/123605-mysqli_fetch_array-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.