how to use else if statement in order to set up value of variable

I want to set variable value in case that there is no value for another variable

if(isset($blockattributes['Date'])){
  $attribute = $blockattributes['Date'];
} else {
  $attribute => `[
    'type' => 'string',
    'default' => 'pro']`
}

i forgot syntax because do not have project in php for 12mounth.