foreach($inp as $supplier) { extract($supplier); // magic variables! echo $supplier_id; echo $supplier_company; }