I am sure this question has been asked but i cant find it so here goes...
I have this code (have to use php 5.3)
foreach ($array["Book"] as $abeBooks) {
$abeResult[$i] = array(
'itemCondition' => $abeBooks['itemCondition'],
'isbn13' =>$abeBooks['isbn13'],
'listingPrice' =>$abeBooks['listingPrice'],
'Link' =>$abeBooks['listingUrl'],
'sellerRating'=>$abeBooks['sellerRating'],
);
$isbn13[$i] = $abeBooks["isbn13"];
$itemCondition[$i] = $abeBooks["itemCondition"];
$sellerRating[$i] =$abeBooks['sellerRating'];
$Price[$i] = $abeBooks["listingPrice"];
$Link[$i] =$abeBooks['listingUrl'];
$i++; }
it returns :
[{"itemCondition":"Fair","isbn13":"9780134167398","listingPrice":"123.5","Link":"www.abebooks.com\/servlet\/BookDetailsPL?bi=22403600014&cm_ven=sws&cm_cat=sws&cm_pla=sws&cm_ite=22403600014","sellerRating":"4"},{"itemCondition":"Very Good","isbn13":"9780134167398","listingPrice":"140.22","Link":"www.abebooks.com\/servlet\/BookDetailsPL?bi=22334428082&cm_ven=sws&cm_cat=sws&cm_pla=sws&cm_ite=22334428082","sellerRating":"4"},{"itemCondition":null,"isbn13":"9780134167398","listingPrice":"480.7","Link":"www.abebooks.com\/servlet\/BookDetailsPL?bi=22173609508&cm_ven=sws&cm_cat=sws&cm_pla=sws&cm_ite=22173609508","sellerRating":"4"}]
what i would like to do is find if the lowest listingPrice if the itemCondition is good,very good, fine, or new and return the entire array for that item ex for this it would return
({"itemCondition":"Fair","isbn13":"9780134167398","listingPrice":"123.5","Link":"www.abebooks.com\/servlet\/BookDetailsPL?bi=22403600014&cm_ven=sws&cm_cat=sws&cm_pla=sws&cm_ite=22403600014","sellerRating":"4"})