- str_repeat: documentation ( source)
<?php
class Foo {
public $field_home_thumbs;
}
$node = New Foo();
$node->field_home_thumbs = array(array('value' => array('field_home_description' => array(array('value' => 'foo')))));
echo $node->field_home_thumbs[0]['value']['field_home_description'][0]['value'], "\n";
$name = 'field_home_thumbs';
$flexifiledname = 'field_home_description';
echo str_repeat('=', 50), "\n";
$string_node = '$node->' . $name . '[0][value][' . $flexifiledname . '][0][value];';
echo $string_node, "\n";
echo eval("return $string_node"), "\n";
echo str_repeat('=', 50), "\n";
$string_node = '$node->' . $name . "[0]['value']['" . $flexifiledname . "'][0]['value'];";
echo $string_node, "\n";
echo eval("return $string_node"), "\n";