Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

PHP ? syntax

$
0
0

Hey everyone,
 
I'm working on some php code and for the first time, I've seen some syntax that goes as follows:

$Result = isset($mValues['Result']) ? $mValues['Result'] : 0;

I'm not exactly sure what this does, but I can take a stab at it:

it checks if the value $mValues['Result'] is set, the ? says to check if it's true, and if it is, set $mValues['Result'] to 0?

 

 

 

 

Thanks in advance for any help!


Viewing all articles
Browse latest Browse all 13200

Trending Articles