Please clarify, I myself can not understand at all. There are 2 tables, posts and user. posts has columns id text author, and user has id names. The author column is associated with the user table. When outputting data from posts in a loop, we get the user id, but how do you print name instead of id?
$res = mysqli_query($link,"SELECT * FROM post "); $rows[] = mysqli_fetch_assoc($res); foreach ($rows as $row){ ?> <span><? echo $row['text'] ?></span><br> <span><? echo $row['author_id'] ?></span> <? }