Jump to content

2D Arrays Problem (help gurus)


Guest upirate

Recommended Posts

Guest upirate

Hi I have the following code that makes an array:

 

$manu_array=array();

 

foreach ( $manu_grouping["matches"] as $doc => $docinfo )

{

$manuname=get_manf($docinfo['attrs']['mfid']);

$mnfcount=$docinfo['attrs']['@count'];

$manu_array[$mnfcount] = $manuname;

}

 

 

when I try to display it i fail :  I need the Array index, name, and count

 

 

foreach ($manu_array as $manu_id => $manu_name => $groupcount )

{

if ($ctr==15)

{ break; };//break after 15 rows

 

 

$ctr++;

$mf_id = $manu_array;

$manf_name = $manu_name;

$mf_count= $groupcount;

 

}

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/40422-2d-arrays-problem-help-gurus/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.