PHP if echo else echo using first bracket

I’ve amended my post and instead of just the PHP if statement i’ve added PHP if else with a link to the PHP Manual.

Try this:

if ( is_single() )
{
  echo ' singlular' 
}else{
  echo  ' archive';
}

// or this IF AND ONLY THERE IS JUST A SINGLE STATEMENT
if ( is_single() )
  echo ' singlular' 
else
  echo  ' archive';


// or this method which I prefer because it is far easier than trying to find where curly brackets start and finish
if ( is_single() ) :
  echo ' singlular' 
else :
  echo  ' archive';
endif;

// or even this as a one-line
echo  is_single()   ?  ' singlular'   :  ' archive';

Please consult the PHP Manual because if/else/endif are frequently used and should be mastered.