Lets say I have an array called $productPrices into which I'm putting values in pairsto represent a product code and a price:
Code: Select all
$productPrices = array();
$productPrices[] = array("AB001"=>"10",);
$productPrices[] = array("AB002"=>"23",);
$productPrices[] = array("AB003"=>"14",);
What I want to do is search through the array for a certain ProductCode and return the corresponding Price.
And I know that each product code is unique, so I want it to break out once its found the ProductCode.
I've read and re-read the manual and tried dozen things but I just can't figure it out!
Thanks in advance!