Hey guys, what is this an what does it do or mean

Discussion in 'Programming' started by mumfry, Nov 28, 2012.

  1. #1
    I have been seeing this in a lot of php scripts i have been working with:

    
    $imdbUrl = "http://exampletexthere" ;
    $html = $this->geturl($imdbUrl);
    PHP:
    the section that really confuses me is the use of the arrow: where its says $this

    $html = $this->geturl($imdbUrl);
    PHP:
    What exactly is that line doing... looks like something(value) is being assigned not sure if am right

    if some one can shine a little light on this for me that would be tremendous

    Thanks
     
    mumfry, Nov 28, 2012 IP
  2. ronaldsg

    ronaldsg Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    This is piece of code from some class declaration, what it does is - class method geturl takes url as parameter, does some manipulations to it and then returns results back.
    To find more how it works, try reading PHP manual about OOP.
    As to what $this stands for, from php manual:
     
    ronaldsg, Nov 29, 2012 IP
  3. mumfry

    mumfry Active Member

    Messages:
    118
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    Thanks alot ronald
    will check that out for sure
     
    mumfry, Nov 29, 2012 IP
  4. torrado

    torrado Greenhorn

    Messages:
    65
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #4
    Thanx a lot for help :)
     
    torrado, Dec 13, 2012 IP