0

i tried to get some data with php, json from cubesql database in php. sql statement is working correct.

var_dump($result):

$array(1) { [0]=> array(1) { ["RA_Name"]=> string(7) "Muster" } }

now i'd like to get just "Muster" with echo command.

looking at this post (Notice: Trying to get property of non-object error) i tried it like that:

echo $rs[0]->RA_Name;

but with that, i get just:

Notice: Trying to get property of non-object in...

what did i wrong here? thanks for any help.

daniel

Community
  • 1
  • 1
daniel
  • 19
  • 3

1 Answers1

3

-> is for objects, but you have an array.

try this:

echo $rs[0]["RA_Name"];
Tanuel Mategi
  • 1,253
  • 6
  • 13