Below is the PHP code to retrieve data:
<?php
$sql = $myquery;
$result = $conn->query($sql);
$QueryArray = array();
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$QueryArray[] = Array($row["Column1"], $row["Column2"], $row["Column3"]);
}
} else {
}
?>
And on the HTML side:
<textarea style="width:100%; height:50%; resize:none; rows="5" cols="40">
<?php
$output = implode("
" , $QueryArray);
echo $output;
?>
</textarea>
However the below query prints:
Array
Array
Array
Array
..etc
Not sure where code is going wrong.