SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    [HELP]a simple question

    i am a newbie of php,maybe this is a simple and a little silly question,but i want to know the true principle of it.hope someone can help me .
    Q:
    there is a function,and have a form like this $a->b in its bracket.what is $a->b mean and have what effect?the sign '->' mean ?

    eg:
    format_date($comment->timestamp)
    Outdoor tools online store and wargame tools shop
    with best quality and service.
    comp molle tactical vest tactical clothing etc sell

  2. #2
    SitePoint Addict
    Join Date
    Jul 2007
    Location
    San Jose, California
    Posts
    355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -> is a way of showing ownership I guess i the best way to describe it.

    $comment is a specific object http://us.php.net/manual/en/language.oop5.php

    timestamp is a member of that object, in this a variable. I'd suggest reading the link above for the most informatino.

  3. #3
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thank you for you reply.
    who can tell me how to see the instance of format_date() is a class not a function.
    from the sign ->.
    wait for more details about it.
    Outdoor tools online store and wargame tools shop
    with best quality and service.
    comp molle tactical vest tactical clothing etc sell


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
  •