You have this:
foreach ( $data as $key => $data_each ) {
if ( is_array($data_each[$key]) ) { $data[$key] = NULL; }
}
Here, $data_each
is a value of $data[$key]
. Try is_array($data_each)
if you want to check whether the value is an array
or not. In the loop $data_each
is same as $data[$key]
.