in my script,
$value= array("DK","Bloomsberry","McGrawHill","OXFORD","DC Books","Springer");
if(in_array("Bloomsberry",$value)){
echo "Bloomsberry is there inside the array";}
else{ echo "Bloomsberry is not there ";}
this works well
i have a variable $names which is a mysql result, which has data "DK","Bloomsberry","McGrawHill","OXFORD","DC Books","Springer" like an array data.
but when i place the variable inside like $value= array($names); instead of $value= array("DK","Bloomsberry","McGrawHill","OXFORD","DC Books","Springer"); , i am getting result "Bloomsberry is not there " instead of expected "Bloomsberry is there inside the array"