I am trying to take a query that gives me this:
"kind": "description"
engine: gm
engine: v6
engine: 350
transmission: auto
transmission: 3 speed
and make it print out on the page like this:
engine: gm, v6, 350
transmission: auto, 3 speed
put all results that are the same "kind" and combine the descriptions together with a ", " in between them
here is the code as it is now:
function grabfeatures($query, $featurelength){
echo "<center><table width=\"480\">\n";
$result = $this->ExecuteQuery($query);
$features = array();
while($row = $this->HashQuery($result)) {
$features[] = $row;
}
$frows = array();
while(count($features)) {
$fr = array_splice($features, 0, 2);
array_push($frows, $fr);
}
foreach($frows as $frowix => $frow) {
echo "<tr>\n";
foreach($frow as $fix => $f) {
$kind = $f["kind"];
$description = $f["description"];
echo "<td><font face=\"verdana\" size=\"1\"><b>$kind:</b> $description</font></td>\n";
}
echo "</tr>\n";
}
echo "</table></center>\n";
}