Merge multi-value results from one column (PHP array)
-
Hello, I would like to get results from the following design in the style “Prague 110 00”, “Brno 620 00” (now “Prague” “110 00” “Brno” “620 00”). Would anyone please advise on how to do this? Thanks in advance!
$sql = "SELECT * FROM `kontakty` WHERE `name` = 'mesto' OR `name` = 'psc'"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo json_encode($row["value"]); } } else { echo "0 results"; } $conn->close();
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Merge multi-value results from one column (PHP array)’ is closed to new replies.