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

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

Copy Clear
Copy Format Clear
<?php function test($a_set_sql, $a_where_sql){ $set_sql = sizeof($a_set_sql) ? 'SET ' . implode(',', $a_set_sql) : ''; $where_sql = sizeof($a_where_sql) ? 'WHERE (' . implode(') AND (', $a_where_sql) . ')' : ''; echo 'UPDATE game_chat_users '.$set_sql.$where_sql; } test(["read"=>1],['session_id' => 4 , 'username' => 'username']);
Copy Clear