<?php class a{ public $b=['f'=>'c']; } $a=new a; $b='b'; echo $a->b['f']; // without the $ it works $x = $a->$b; // otherwise you need to assign first echo $x['f']; // now it works echo $a->{$b}['f']; // or wrapped in curlies
You have javascript disabled. You will not be able to edit any code.