I didnot understand why this is not working in PHP 7.0
$obj = mysqli_fetch_object(...);
if (is_object($obj)) { // OK
echo $obj->name;
// writes Hello
$my_var = "name";
echo $obj->$my_var;
// writes Hello
$my_arr = array('test' => array('col' => 'name'));
echo $obj->$my_arr['test']['col']; // <-- this didnot work
// writes nothing :(
}
Could I anyway to correct it?