0

Hi I have a constructor in a php class

public function __construct($configData){ 
    $this = $configData
}

$configData is an array

I want to do something like this

$this->data1 = $configdata['data1'];

instead of doing it one by one, I want all details in configData to be converted automatically into that context so if i have data1, data2, data3 , they can be converted into the context values.

I hope I was clear .

RiggsFolly
  • 89,708
  • 20
  • 100
  • 143
Gabs
  • 117
  • 3
  • 10

0 Answers0