Here's an example of how to use SQLite in PHP. In this example we use ':memory:' as the filename, which creates the database in memory instead of on the disk. We create a table, insert a couple records, and then select those records.
<?php $db = sqlite_open(':memory:', 0666, $error); $result = sqlite_exec($db, 'CREATE TABLE foo (first TEXT, last TEXT)'); $result = sqlite_exec($db, "INSERT INTO foo (first, last) VALUES ('Joel', 'Dare')"); $result = sqlite_exec($db, "INSERT INTO foo (first, last) VALUES ('Heidi', 'Dare')"); $result = sqlite_array_query($db, "SELECT * FROM foo ORDER BY first, last", SQLITE_ASSOC); sqlite_close($db); print_r($result); ?>