Indexed array question
Submitted by zzz on Sat, 2006-02-25 03:10.
ezSQL
How do I get my query results into an indexed array?
$myarray = $db->get_results("SELECT page FROM t1
WHERE item = '$book'");
I would like to then do array_search withing that array to see what array key value corresponsd to my given variable. Something like this:
if (($key = array_search($needle, $haystack)) !== false) {
$thisval = $haystack[$key];
}
