I want to assign a value to the values in the foreach loop I've defined a variable for this, but it returns a null value when I print
$authority = getWithResult('authorites', 'UserId', $id);
$sidebar = null;
foreach($authority as $yetki){
$sidebar = getWithResult('sidebar', 'Id', $yetki->SidebarId);
}
print_r($sidebar);
output: Array ( )