Given as an example:
$store = {A, B, C, D, E}
$price = {2, 10, 1, 500, 20}
Store[0]'s value is 2, [1] is 10, and so on. I'd like to know how to do that. I tried using min() but to no avail (unless I missed something out). Here's what I've done so far:
$x;
for ($x = $price.Count - 1; $x >= 0; $x--)
{
//this is the part where I can't figure it out
//compare prices here
//get the lowest price
//x = theSubstringOfTheLowestPrice
}
echo $store[x];