<?php $n = new stdClass(); $n->dog = array(); $n->dog['und'][0]['value'] = '12345'; $d = 'dog'; //print_r($n->$d['und']);//['und'][0]['value']; print_r($n->{$d}['und']);
You have javascript disabled. You will not be able to edit any code.