You're losing me hear without sample data, but I'll try.
Ideally your input array would be something like:
$result[] = array('id'=>23, 'text'=>'ok', 'relevance'=>2);
$result[] = array('id'=>42, 'text'=>'joel', 'relevance'=>1);
$result[] = array('id'=>23, 'text'=>'php', 'relevance'=>1);
Which gives
Merlin wrote:
Brent Baisley wrote:
Use the id number as the array key and a simple loop should join
everything together.
for($i=0; $i
$id = $result['id'][$i];
$text = $result['text'][$i];
$relevance = $result['relevance'][$i];
$resultSummary[$id]['id'] = $id;
if ( isset($re
Brent Baisley wrote:
Use the id number as the array key and a simple loop should join
everything together.
for($i=0; $i
$id = $result['id'][$i];
$text = $result['text'][$i];
$relevance = $result['relevance'][$i];
$resultSummary[$id]['id'] = $id;
if ( isset($resultSummary[$
Use the id number as the array key and a simple loop should join
everything together.
for($i=0; $i
$id = $result['id'][$i];
$text = $result['text'][$i];
$relevance = $result['relevance'][$i];
$resultSummary[$id]['id'] = $id;
if ( isset($resultSummary[$id]['text']) ) {
$resultSummary[$id][
4 matches
Mail list logo