I have the following code which works perfectly fine to give me the name of the customer with the ID of 10:
foreach($customer_list as $row) {
if ($row->CUSTOMER_ID == 10)
echo $row->NAME;
}
Is there a way I can do this more directly, without the foreach loop and if statement? I'd like to do something like:
echo $customer_list[CUSTOMER_ID][10]->NAME;
But I don't know the syntax or if it's even possible.