Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear
SELECT * from dual union

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php $query = "select ? a, ? b, ? c from dual union select 11 a, 12 b, 13 c"; $stmt = $mysqli->prepare($query); $stmt->bind_param("sss", ...[1,2,3]); $stmt->execute(); $stmt->store_result(); $result = ['a','b','c']; $stmt->bind_result(...$result); $output = array(); while ($stmt->fetch()) { $output = array_merge($output, $result); } var_dump($output);
Copy Clear