Hello, I'm having troubles with variable substitution:
I'm trying to reach this:
$this->message[0];
so, the string "message" is part of an array.
looks something like this:
$fields = array("message", "name");
$this->fields = 2;
"0" (in message[0]) is $i
Im trying it this way:
for($i=0; $i<=($this->rows-1); $i++){
for($j=0; $j<=($this->fields-1); $j++){
$this->{"$fields[$j][$i]"} = $this->value[$j];
unset($this->value[$j]);
}
$this->value = array_values($this->value);
}
with this I get variables like $this->{"message[0]"}
and as I said, I want $this->message[0];
What am I doing wrong? is there any way to do what Im trying?