I'm so confused right now, I'm using a code igniter frame block and passing an array to the view so that I can access the variable from the view.
So in this view, when I do
echo var_dump($data["mykey"]);
I get
string '43' (length=2)
but when i try
echo $data["mykey"];
I get
A PHP Error was encountered
Severity: Notice
Message: Undefined index: "mykey"
Line Number: 8
???
EDIT (the problem is that when a code igniter tries to return from a view to pass it back to the controller as a string, this is my conclusion, because if I put a stamp at the end of the view, it works)
An array $datais like this and in my opinion I'm trying to makeecho $data["myfield"][0]["data"]
array
'myfield' =>
array
0 =>
array
'data' => string '1'
'myfieldb' =>
array
0 =>
array
'data' => string '2'
source
share