Originally posted by diego25
Look into the pattern modifiers...I think you have to use /s.
If I modify it like this:
preg_match_all("/CREATE TABLE.+/s", $file_content, $m);
it will read the who SQL table, but it doesn't work correctly. It reads both of the tables into same place.
[0] => CREATE TABLE name1 (......
CREATE TABLE name2 (......
I need to get from that file all SQL-tables into an array like this:
$tables = array(
[1] => "table1",
[2] => "table2");
Hopefully someone understands my odd thoughts 🙂