which1ispink which1ispink - 3 months ago 8
PHP Question

What does this PHP syntax mean? (question marks)

What does this line of PHP code mean? That is, the question mark bit followed by true, colon, false?

return(isset($_SESSION['id'])) ? true : false;

kba kba

It's a ternary operator.

It's simply short-hand for:

if (isset($_SESSION['id']))
  return true;
  return false;