I have a field that stores a value of an array with several separate data with (,) in the same field of the database, as I do to show that data to show that information in a report.
$sql = mysqli_query($con, "select * from document where project_id in (".$project_id.
")");
while ($row = mysqli_fetch_array($sql)) {
$array = explode(",", $row['project_id']);
foreach($array as $projects) {
echo $projects;
}
}
Displays the following error:
Fatal error: Can not use object of type mysqli_result as array in C: \ wamp64 \ www \ SysCPC \ ajax \ documents.php on line 129
The information you should show is the Department