How do I get this syntax error?
$this->extensoes_validas = $extensoes_validas ['jpg','jpeg','jpe','gif','bmp','png'];
What I wanted was to assign this array to $this->extensoes_validas
How do I get this syntax error?
$this->extensoes_validas = $extensoes_validas ['jpg','jpeg','jpe','gif','bmp','png'];
What I wanted was to assign this array to $this->extensoes_validas
It's syntax error. This solves the problem:
$extensoes_validas = array('jpg','jpeg','jpe','gif','bmp','png');
$this->extensoes_validas = $extensoes_validas;
The correct one would be:
$this->extensoes_validas = ['jpg','jpeg','jpe','gif','bmp','png'];
If you want to access some specific index of this array, you can use the following:
echo $this->extensoes_validas[0]; // jpg
echo $this->extensoes_validas[1]; // jpeg
And so on.