I have been able to create the array after my query.
<?
$results = array();
while($row = mysql_fetch_assoc($result))
{
$results[] = $row;
}
?>
I now have the following array from the query result:
array(2) {
[0]=>
array(1) {
["form_type"]=>
string(6) "VF-302"
}
[1]=>
array(1) {
["form_type"]=>
string(6) "VF-301"
}
}
If, for instance, the "VF-301" value exists the array, what would a php if statement be?
<? //not working
if(in_array("VF-300", $results)){
echo "this value is in array";
} else {
echo "this value is not in array";
}
?>