Jump to content

Is END IF needed ??


spacepoet

Recommended Posts

Hello:

 

I have a small chunck of code that dosplays data depending on which PlayerID is selected.

 

Like so:

<?php
$myvar = $_REQUEST['PlayerID'];
?>
...
<?php 

if ( $myvar == "1" ) { echo "Your name is Tina"; }

elseif ( $myvar == "2" ) { echo "Your name is Sue"; }

else { echo "Your name is Jill"; }

?>

 

This works fine - no errors - but I am use to ASP and using an "End If" after "Else" ...

 

Is this not needed in PHP?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/225445-is-end-if-needed/
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.