I'm looking for some help with this one ...
I have an array that has a specific key assigned to each value
$dfc_hrs = array( 'eight' => $eight,
'nine' => $nine,
'ten' => $ten,
'eleven' => $eleven,
'twelve' => $twelve,
'one_p' => $one_p,
'two_p' => $two_p,
'three_p' => $three_p,
'four_p' => $four_p,
'five_p' => $five_p,
'six_p' => $six_p,
'seven_p' => $seven_p,
'eight_p' => $eight_p,
'nine_p' => $nine_p);
The value of each key is either a 1 or a 0.
Is there way to loop through the array and pull out only those keys with the value of 1?
I am trying to create a string from the array that will be only the keys with the value of 1.
thanks in advance.
MS