Wednesday, December 5, 2012

How I get the index value using Hash::extract() on this array

Array(
[168] => Array
    (
        [check] => 0
    )

[169] => Array
    (
        [check] => 1
    )

[170] => Array
    (
        [check] => 1
    )

[171] => Array
    (
        [check] => 1
    )

[172] => Array
    (
        [check] => 0
    )
);


I try it, $a = Hash::extract($arrayCheckBoxCheked,'{n}[check=1]'); pr($a); but it returns:

Array  (      [0] => Array          (              [check] => 1          )        [1] => Array          (              [check] => 1          )        [2] => Array          (              [check] => 1          )    )


I need the index of this array.




--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: