<?php $keys = ['id', 'creditcard', 'annualfee', 'regularapr', 'purchaseapr', 'balancetransferapr']; $data = [ 'id', 'creditcard', 'annualfee', 'regularapr', 'purchaseapr', 'balancetransferapr', '1', 'Discover it Cash Back', '$10', '11.99% - 22.99% variable', '0% for 14 months Valin Link', '0% for 14 months', '2', 'Chase Freedom Unlimited', '$20', '22.99 - 22.74% Variable', '0% Intro APR on Purchases for 15 months', 'N/A', ]; $chunks = array_chunk($data, count($keys)); // throw away first chunk as it holds filed names array_shift($chunks); $result = []; foreach ($chunks as $chunk) { $result[] = array_combine($keys, $chunk); } print_r($result);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`