Though I am not good with cakePHP, but seeing the array output, it looks that the ‘chk’ itself is an array you need to access it as follows:
echo $this->data['Project']['chk'][2]; // will print 2
//if you want to access all the values then loop the array:
foreach($this->data['Project']['chk'] as $userId){
echo $userId . '<br />';
}
I suspect the array output is correct as you supposed to be there. ‘[chk[2]’ this has been an index of an array element rather than the array.I don’t know how cakePHP parses form elements. So try something like this and see what it prints for you: