I have code where I convert a SQL statement into a temporary variable and then put it into an array. I want to use this array and have "SELECT", "FROM" and "WHERE" serve as 'delimiters' (ie. when the array finds "FROM", read until hits instance of "WHERE").
What stuff should I be looking at in PHP.net?
Thanks,
Eve
$sql2 = "$sql";
$chars = preg_split('/ /', $sql2, -1, PREG_SPLIT_DELIM_CAPTURE);
print_r($chars);
while ($word = mysql_fetch_array($chars)) {
echo "Test";
}
//echo $sql2;
if (preg_match ("/\bplacement_candidate\b/i", "$sql2")) {
//print "placement_candidate was found.<BR>";
}
if (preg_match ("/\bplacement_primarytech\b/i", "$sql2")) {
//print "placement_primarytech was found.<BR>";
}