Re: [PHP] Array unset()

2012-09-24 Thread Ashley Sheridan
Ken Robinson kenrb...@rbnsn.com wrote: At 08:50 PM 9/23/2012, Ron Piggott wrote: I am wondering if there is a way to remove from an array where the value is 0 (“zero”) Array example: $total_points_awarded = array( 1 = 17, 3 = 14, 4 = 0, 5 = 1, 6 = 0 ); In this example I would like to

[PHP] Array unset()

2012-09-23 Thread Ron Piggott
I am wondering if there is a way to remove from an array where the value is 0 (“zero”) Array example: $total_points_awarded = array( 1 = 17, 3 = 14, 4 = 0, 5 = 1, 6 = 0 ); In this example I would like to remove element # 4 and # 6. The “key” ( 1,3,4,5,6 ) represents the member’s account

Re: [PHP] Array unset()

2012-09-23 Thread Ken Robinson
At 08:50 PM 9/23/2012, Ron Piggott wrote: I am wondering if there is a way to remove from an array where the value is 0 (“zero”) Array example: $total_points_awarded = array( 1 = 17, 3 = 14, 4 = 0, 5 = 1, 6 = 0 ); In this example I would like to remove element # 4 and # 6. The

[PHP] Array unset

2004-11-16 Thread Bruno B B Magalhães
Hi, I my system can handle invisible modules, so they can't show in the menu but stills works... here is the code: $c = count($modules)-1; for($i = 0; $i = $c; $i++) { if($modules[$i]['moduleVisibility'] == 0) {