Hi all,
In fetching a result from a table (below code), 1 is also printed after the fetched record (fetched record below). There is no 1 in the table, nor have I accidentally included it in my script. What is it and why does it appear?
<?php
require 'db/connect.php';
if($result = $db->query("SELECT * FROM user")) {
if ($count = $result->num_rows) {
$rows = $result->fetch_assoc();
echo '<pre>', print_r($rows), '</pre>';
}
}
?>
Array ( [id] => 1 [first_name] => Bill [last_name] => John [bio] => I'm a web developer [created] => 2016-11-21 12:50:12 ) 1