Jump to content

Want to know whats going on here?


takn25

Recommended Posts

Hi again,

 

Here is the code    $string .= (substr($string,-1) == '-') ? '' : '-';

 

I know what this code does but to increase my knowledge could some one tell me what is the

question mark symbol for ( ? ) and what is the colon doing. As I have seen the ?  in a lot of scripts but have no clue what it does and what its used for cheers!

Link to comment
https://forums.phpfreaks.com/topic/234387-want-to-know-whats-going-on-here/
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.