print with php [closed]

0

I have this code:

foreach($this->table_descriptor->getColumns() as $column){
  $buf .= "\t\t$this->$".$column['Field']." = NULL,\n";
}

what should print:

$this->Columna = NULL,

but I get the following error:

syntax error, unexpected T_CHARACTER, expecting T_STRING in 

Any suggestions? Thank you!

    
asked by Alf 05.06.2018 в 14:40
source

1 answer

1

you must escape the characters $ a \ $ both the $this to \$this as the one in front of the variable. They are the ones giving you that error.

    
answered by 05.06.2018 / 15:07
source