Jump to content

elseif statement issue


AbeerSaba

Recommended Posts

hi all , i am a new php learner i tried to make my 1st elseif statement i ran into a syntax error , tried several options non worked , would you please help ?! the code is below & i cant seems to work this issue any help is highly appreciated .

<?php

$name = ' sara ' ;

if ( $name == 'New York' )
{
echo 'This is New York';
}

elseif 
( $name == 'sara' )



echo ' hi sara ' ; 

}


else
{
echo 'No Match Found';
}

?>

Link to comment
https://forums.phpfreaks.com/topic/297083-elseif-statement-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.