Is there anything wrong with something like...
$data = array();
$results = $db->query($sql);
while ($row = $results->fetch()) {
// ... this right here:
$data[$row->id][] = $row->someStringValue
}
You can see I am trying to build up an array of arrays whose the keys are id
numbers and whose values are arrays of strings. I have tried it and it works
fine. I just wonder if it's kosher as a matter of cleanliness and style.
--
David Mintz
http://davidmintz.org/
It ain't over:
http://www.healthcare-now.org/
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org/Show-Participation