$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 ";}
これは私が配列データのようなデータを持っている"DK","Bloomsberry","McGrawHill","OXFORD","DC Books","Springer"
mysqlの結果、ある$names
変数を持っているだけでなく
に動作します。
が、私は$value= array($names);
代わりの$value= array("DK","Bloomsberry","McGrawHill","OXFORD","DC Books","Springer");
のような内部変数を配置するとき、私は結果"Bloomsberry is not there "
を得る代わりに"Bloomsberry is there inside the array"