Hi,
Please tell me how to store a column from db in array.
My table name is qtype, and the fields in table are id & type.
PHP Code:
$sql="select type from qtype"; $result=mysql_query($sql);
I had selected the type from table.
There are some 6types in type field, and i have to store all the 6 in array.
How shall i do this. Any ideas please tell me.
Thanks for the reply Abduraooft.
I got the result.
Now I am having another column in same table. I need to compare both. I have to chech like if the type is in the array(), some conditions will have to do. How shall i do this. please tell me.
My ultimate aim is, I've already stored my type in another variable($var2). Just i need to check whether this $var2 is in the $arrType. I did it and the solution is
Now i have to include another php file inside this if condition, storing the php file name in some variable like $a=a.php. and when clicking, it have to open the corresponding ouput in a.php file needed.
Any ideas please tell me.