打印数组php的值

时间:2011-09-19 20:06:24

标签: php arrays multidimensional-array

我有一个值为

的数组
Array (
    [und] => Array (
        [0] => Array (
            [value] =>
Drupal Development
PHP
CSS
MySql
Photoshop
Illustrator
InDesign
             [format] =>
             [safe_value] => <li class="drupal">Drupal Development</li> <li class="php">PHP</li> <li class="css">CSS</li> <li class="mysql">MySql</li> <li class="ps">Photoshop</li> <li class="il">Illustrator</li> <li class="in">InDesign</li>
         )
     )
 ) 

数组是$node->field_spec我怎样才能打印出值和安全值?我无法得到它。

1 个答案:

答案 0 :(得分:4)

$safe_value = $node->field_spec['und'][0]['safe_value']

请参阅arrays