PHP how to display multiple array values

carlosdavid

New Member
How can I display array values that I retrieved from the database for example the following array values.\[code\]while($row = mysqli_fetch_array($query)){ $post_id[] = $row['id']; $post_user_id[] = $row['user_id']; $post_title[] = $row['title'];}\[/code\]Output.\[code\]<li><a href="' . $post_user_id . 'post.php?id="' . $post_id . '">' . $post_title . '</a></li><li><a href="' . $post_user_id . 'post.php?id="' . $post_id . '">' . $post_title . '</a></li><li><a href="' . $post_user_id . 'post.php?id="' . $post_id . '">' . $post_title . '</a></li><li><a href="' . $post_user_id . 'post.php?id="' . $post_id . '">' . $post_title . '</a></li><li><a href="' . $post_user_id . 'post.php?id="' . $post_id . '">' . $post_title . '</a></li>\[/code\]
 
Back
Top