Mask Mask - 1 year ago 88
PHP Question

How do I add a new member variable in PHP?

I want to do something like:

class Name{
function assign($name,$value){

Which is pretty much the same as
in smarty:


How do I implement this?

Answer Source
class Name {
   private $values = array()

   function assign($name,$value) {
       $this->values[$name] = $value;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download