masat Posted July 2, 2009 Posted July 2, 2009 $PHP_SELF = (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']); Can you tell me how to read this in plain language. I need the meaning of ? and : as they are used in this statement and extensively throughout the application. How do you know when you know what you want to do for the rest of your life?
germ Posted July 2, 2009 Posted July 2, 2009 if $_SERVER['PHP_SELF'] is defined $PHP_SELF = $_SERVER['PHP_SELF'] else $PHP_SELF = $_SERVER['SCRIPT_NAME']); If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
♥ecartz Posted July 2, 2009 Posted July 2, 2009 It is documented at http://www.php.net/manual/en/language.oper....comparison.php as the ternary operator (meaning it takes three operands). It exists in most of the C family of languages (e.g. PHP, Perl, C, C++) but not all (e.g. Java). Always back up before making changes.
masat Posted July 2, 2009 Author Posted July 2, 2009 Thanks for the info. I had tried locating this info at php.net but I needed to look for operands. Everything I know about php I have learned from osc and php.net and of course the numerous article I've read but I guess sometimes a formal education may be the thing needed. Thanks for all your help to the community but I wonder. How do you find the time? How do you know when you know what you want to do for the rest of your life?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.