I'm new at PHP, so if there's some kind of advice, it will be well received.
I want to concat all the results I get from a sql query to my database.
I got the code:
$sql = $_POST['sql']; /*sql query*/
$result = "";
$query = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_array($query, MYSQLI_NUM)) {
$result = $result . ' ' . $row;
}
echo $result;
What I want is not a sql query that concats, but a way to concat rows with PHP.