First I would like to let you guys know that I am no expert in PHP, I know some basics. I am learning by myself, this is why I am turning to you guys for help.
I made some search but in vein, I can't figure out what should I search for.
Line of code from a whole block
$base_root = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
So the block of code is for building the url. This line of code choose if its either http or https.
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
This line checks if https is set. Until now its ok
? 'https' : 'http';
This is where I need help. What does the '?' and ':' does?
Thanks in advance. Also it would be great if you guys could recommend me some books, sites or tutorials where I can learn.
Kind Regards