Just don’t set it in the first place
function createArray($rows){
$array = array();
if(isset($rows['UnitId'])) $array['id'] = $rows['UnitId'];
}
1
solved PHP shorthand to skip a variable assignment
Just don’t set it in the first place
function createArray($rows){
$array = array();
if(isset($rows['UnitId'])) $array['id'] = $rows['UnitId'];
}
1
solved PHP shorthand to skip a variable assignment