Hi guys,
I have an associative array (arrInfo) that I can’t seem to get the data from. Here’s the print_r output as an example:
Array ( [0] => Array ( [label_text] => Area of coverage [data] => 160 m� ) [1] => Array ( [label_text] => Dimensions [data] => 352 x 277 x 112 (mm) ) [2] => Array ( [label_text] => Finish [data] => Aluminium ) [3] => Array ( [label_text] => Lamp [data] => EcoLite energy saving 13 watt (�2) ) [4] => Array ( [label_text] => Lead length [data] => 1.1m ) [5] => Array ( [label_text] => Mounting [data] => Wall mount, ceiling suspend or free stand ) [6] => Array ( [label_text] => Power input [data] => 230Vac 50Hz (standard UK mains supply) ) [7] => Array ( [label_text] => Warranty period [data] => 1 year ) )
I need to iterate this array to create a HTML definition list (DL) with the DD term as the [label_text] and the DT as the [data value] for each row.
The code I have right now is:
foreach($arrInfo as $row) {
echo ”.$row.”.$row.”;
}
but it only returns the last row of the array (arrInfo)?