dont know what &$ is

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nga
Forum Commoner
Posts: 46
Joined: Mon Aug 17, 2009 3:05 am

dont know what &$ is

Post by nga »

what does &$variablename do?

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

I'm so confuses about php classes
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: dont know what &$ is

Post 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.
nga
Forum Commoner
Posts: 46
Joined: Mon Aug 17, 2009 3:05 am

Re: dont know what &$ is

Post 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
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: dont know what &$ is

Post 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
nga
Forum Commoner
Posts: 46
Joined: Mon Aug 17, 2009 3:05 am

Re: dont know what &$ is

Post 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
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: dont know what &$ is

Post by daedalus__ »

User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: dont know what &$ is

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply