Advanced Search

Results 1 to 9 of 9

Thread: why this symbol used?

  1. #1
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default why this symbol used?

    i found this in a coding.....

    $this->${title}



    why to use {} braces in front of title?

    i never used this symbol in my code?


    what is the purpose of this symbol?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,158
    Thanks
    28
    Thanked 623 Times in 619 Posts
    Blog Entries
    1

    Default

    Well, first you may want to check out this thread.

    Now, to understand the above - you must understand the define() function. My explanation was stupid, so it's replaced with this:
    Quote Originally Posted by techietim
    Yeah. Say it's called a constant, it's kind of like a variable in the sense that it stores data, however, once the data is set, it cannot be changed, the data can be only be scalar, and it is accessed differently.
    So:
    PHP Code:
    <?php
    define
    ("hello""How are you today?");
    echo ${
    hello};
    ?>
    Would return:
    How are you today?
    Last edited by Nile; 01-18-2010 at 11:09 PM.
    Jeremy | jfein.net

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,629
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by Nile View Post
    Well, first you may want to check out this thread.
    ^ that's freakin' COOL. Makes all the experimenting I did last night useless, but oh well.
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

  4. #4
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default

    make it more clear

  5. #5
    Join Date
    Jan 2008
    Posts
    4,158
    Thanks
    28
    Thanked 623 Times in 619 Posts
    Blog Entries
    1

    Default

    It will never get more clear - sorry.
    Jeremy | jfein.net

  6. #6
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default


  7. #7
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default

    ok as u wish

  8. #8
    Join Date
    Jan 2008
    Posts
    4,158
    Thanks
    28
    Thanked 623 Times in 619 Posts
    Blog Entries
    1

  9. #9
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default

    its better
    thnx

Bookmarks

Posting Permissions

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