Forum Moderators: coopster
I am having a hard time figuring out how to 'merge' the results.
Example:
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {$str = $order->products[$i]['name'];
$str_Pattern = '/[^ ]*$/';
preg_match($str_Pattern, $str, $results);
echo '<tr><td>'.$results[0].'</td>';
$results[0] will say the following:
Widget
Widget
Widget
Cool Widget
Not-so-cool Widget
If $results[0] is the same, can I merge that and say:
3 Widget
Cool Widget
Not-so-cool Widget
Is this even possible?