what does &$variablename do?
also, what' the different between class::method and objectname->method?
I'm so confuses about php classes
dont know what &$ is
Moderator: General Moderators
Re: dont know what &$ is
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
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
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: dont know what &$ is
:: 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
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
can give me the link reference for &$? i dont even know what that is and type "&$ php" to google doesnt return anything useful
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: dont know what &$ is
&$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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.