I have a result set of data that I want to write to an array in php. Here is my sample data:
**Name** **Abbrev** Mike M Tom T Jim J
$person = array('name' => 'Mike', 'initial' => 'M'); array_push($people, $person);
That said, I'm not sure why you're storing the data separately. The initial can be fetched directly from the name via substr($name, 0, 1).
substr($name, 0, 1)