PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE A ( DATA VARCHAR(10) NOT NULL ); INSERT INTO A ( DATA ) VALUES ('a'); INSERT INTO A ( DATA ) VALUES ('b'); SELECT * FROM A;
Copy Clear
Copy Format Clear
<?php use Carbon\Carbon; $query = "SELECT DATA FROM A;"; // get DB version using PDO $stmt = $pdo->prepare($query); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC); extract($row); var_dump($data); $a = 'hi'; $b = array( '1' => 'hi', '2' => 'bye' ); var_dump(in_array($a, $b, true));
Show:  
Copy Clear