Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post A '?' in a string.

    I've been meaning to ask, but what does a '?' in a string do? Such as
    PHP Code:
    isset($_GET['this']) ? $thisDir base64_decode($_GET['this']) : $thisDir '.'
    Thanks
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it's just an alternative syntaxform for
    PHP Code:
    if (isset($_GET['this'])){
       
    $thisDir base64_decode($_GET['this']);
    } else }
      
    $thisDir '.';

    if you're concerned about your cyberspace-credabality as a nerd, then use it.
    if you're concered about the readebility of your code, then better use
    PHP Code:
    $thisDir '.';
    if (isset(
    $_GET['this'])){
       
    $thisDir base64_decode($_GET['this']);

    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #3
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by raf
    it's just an alternative syntaxform for
    if you're concered about the readebility of your code, then better use
    LOL!!

    Thanks
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •