what's {$variable} mean

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
seveninstl
Forum Newbie
Posts: 4
Joined: Fri May 14, 2004 12:38 pm
Location: Kissimmee, FL

what's {$variable} mean

Post by seveninstl »

Can someone explain what this does/means? Specificly the variable with the braces around it.

function process_this($variable)
{
return $this->{$variable}
}

Thanks for any/all help :)

seveninstl
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

http://php.net/manual/en/language.types ... ax.heredoc
See the bit about "Complex (curly) syntax"
Post Reply