I am populating an array
$du
through a foreach
loop like this
foreach ( $arr as $v => $r ) {
$du['id'] = $r['id'];
$du['name'] = $r['name'];
$Sales->insert($du);
$du = '';
}
The above piece of code is populating $du
properly in PHP 5.6
and PHP 7.0.2
but when we upgraded to PHP 7.2
$du
is returning 1.