Jump to content

What does this type of statement mean


monkeytooth

Recommended Posts

$_GET['id'] = (empty($_GET['id'])) ? 0 : $_GET['id'];

 

I'm going over someones code, the site is super flawed, Ive got to much going on at once and I can't wrap my head around that. Is it if the string is empty or 0 then use the get variable or is it something else?

 

 

Link to comment
https://forums.phpfreaks.com/topic/216437-what-does-this-type-of-statement-mean/
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.