Jump to content

if statement


ngreenwood6

Recommended Posts

I am trying to do an inline if statement. I havent done it in awhile so I forget the correct syntax but if I wanted to put this code on one line how would I do it?

 


if(isset($_GET['test']))
{
$message = $_GET['test'];
}
else
{
$message = '';
}

 

Any help is appreciated. I know it is a ? and a : but cant remember it exactly lol

Link to comment
https://forums.phpfreaks.com/topic/176348-if-statement/
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.