Page 1 of 1

dont know what &$ is

Posted: Sun Dec 20, 2009 11:45 pm
by nga
what does &$variablename do?

also, what' the different between class::method and objectname->method?

I'm so confuses about php classes

Re: dont know what &$ is

Posted: Mon Dec 21, 2009 12:05 am
by JakeJ
I highly suggest that you google "PHP Tutorials" and start from there. There's lots of great information on how to get started. If you are having a specific issue, then post it here. But try the tutorials and run through some example code. I suggest http://www.w3schools.com as a good place to start.

Re: dont know what &$ is

Posted: Mon Dec 21, 2009 12:43 am
by nga
I do know php:( (working with php for half a year now) but never tried it using classes (only use functions). I googled to learn php classes today and hit ->, &$ and :: notations which i also googled around but none explain them clearly

Re: dont know what &$ is

Posted: Mon Dec 21, 2009 12:52 am
by daedalus__
:: is the scope resolution operator.

the manual explains most of the concepts fairly well, if you don't believe me, you are wrong.

so read up: http://us.php.net/manual/en/language.oop5.php

Re: dont know what &$ is

Posted: Mon Dec 21, 2009 2:15 am
by nga
can give me the link reference for &$? i dont even know what that is and type "&$ php" to google doesnt return anything useful

Re: dont know what &$ is

Posted: Mon Dec 21, 2009 2:54 am
by daedalus__

Re: dont know what &$ is

Posted: Mon Dec 21, 2009 10:14 am
by pickle
&$variable is used when "passing by reference". Take note of the PHP version you're using, as PHP4 & PHP5 have slightly different uses for it.