I have this code to iterate over a mysqli query:
while($row = mysqli_fetch_array($result)) {
$posts[] = $row['post_id'].$row['post_title'].$row['content'];
}
It works but it returns:
Variable #1: (Array, 3 elements) ↵ 0 (String): "4testtest" (9 characters) 1 (String): "1Hello world!Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!" (99 characters) 2 (String): "2Sample PageThis is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes)." (161 characters)
The problem is that it puts all three columns into one column, so I can't access them separately.
Can someone please guide me on this?.