I'm new to php and its developing . I declared php array:
<?php
$chk_group[] =array(
'1' => 'red',
'2' => 'thi',
'3' => 'aaa',
'4' => 'bbb',
'5' => 'ccc'
);
var_dump($chk_group);
//continue for loop
for ($i = 0 ; $i < count($chk_group); $i++) {
echo count($chk_group);
}
?>
here i'm getting count = 1 please help me to get count of array.
$chk_group[] = array(...)rather than$chk_group = array(...), you've made$chk_groupa multi-dimensional array, with a single entry at the top level