jasonc Posted September 6, 2010 Share Posted September 6, 2010 I wish to get only the last part of each array 'g' And then show non duplicated 'g' but in the same order that it was in the original array. <?php $formarray = array( 'name' => array( 'i1'=> array('a'=>'a1', 'b'=>'b1', 'c'=>'c1', 'd'=>'d1', 'e'=>'e1', 'f'=>'f1', 'g'=>'g1'), 'i2'=> array('a'=>'a2', 'b'=>'b2', 'c'=>'c2', 'd'=>'d2', 'e'=>'e2', 'f'=>'f2', 'g'=>'g2'), 'i3'=> array('a'=>'a3', 'b'=>'b3', 'c'=>'c3', 'd'=>'d3', 'e'=>'e3', 'f'=>'f3', 'g'=>'g3'), 'i4'=> array('a'=>'a4', 'b'=>'b4', 'c'=>'c4', 'd'=>'d4', 'e'=>'e4', 'f'=>'f4', 'g'=>'g4'), ) ); foreach ($formarray as $newarray => $a) { ?><strong><?=$newarray;?></strong><br><? foreach ($a as $key => $k) { ?>"<?=$key;?>", <? foreach ($k as $b) { //if ($k['DBfield'] != "") { ?>"<?=$b;?>", <? //} } ?><br><? } //end of second foreach ?><br><br><br><? } //end of first foreach ?> Link to comment https://forums.phpfreaks.com/topic/212685-show-last-part-of-array-same-order-no-duplicates/ Share on other sites More sharing options...
geraldpolar Posted September 6, 2010 Share Posted September 6, 2010 mysql_insert_id(); Link to comment https://forums.phpfreaks.com/topic/212685-show-last-part-of-array-same-order-no-duplicates/#findComment-1107921 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.