This seems like such a newb question but I'm looking through some old code and I cant believe I came to doing something the way I did ... and what's worse, I cant seem to see a better way.
I generate an array with a list of values, which print_r shows as:
Code: Select all
array( [32]=> Small [34]=> Medium [46]=> Large )Then later on, in order to find the last one, I just do:
Code: Select all
foreach($size_list as $key=>$size_name){
if($key == $size_last) ... do suff
}Any tips would be great. Cheers
