I have an array that is filled with values dynamically and I have to check if a value exists.
I tried the follwing but it's not working:
while (.....) {
$fileData[] = array( "sku" => $sku, "qty" => $qty);
}
$product_sku = $product->getSku();
if (in_array(array("sku",$product_sku), $fileData)){
echo "OK <BR/>";
}
else{
echo "NOT FOUND <BR/>";
}
The whole thing with keys confuses me. Should I change the table structure or just the in_array() statement? Can you help me find a solution?