能够在print_r()的输出中看到变量,但不确定如何在代码中访问它我在google上搜索,安装了devel,Drupal来查找Firebug,但是我找不到它。我发现什么我想,我知道哪里是的,我只是不知道多么,怎样为了得到它。我将把它放在代码括号中,但devel告诉我文件名(我想把它放在.tpl.php文件中)在这里:field_image (Object) stdClass
handler (Object) views_handler_field_field
view (Object) view
result (Array, 2 elements)
0 (Object) stdClass
_field_data (Array, 1 element)
nid (Array, 2 elements)
entity (Object) stdClass
field_image (Array, 1 element)
und (Array, 1 element)
0 (Array, 11 elements)
filename (String, 23 characters ) FILENAME.jpg那么,如何使用PHP输出FILENAME.jpg呢?<?php print $something->other; ?>
3 回答
猛跑小猪
TA贡献1858条经验 获得超8个赞
field_image (Object) stdClass handler (Object) views_handler_field_field view (Object) view result (Array, 2 elements) 0 (Object) stdClass _field_data (Array, 1 element) nid (Array, 2 elements) entity (Object) stdClass field_image (Array, 1 element) und (Array, 1 element) 0 (Array, 11 elements) filename (String, 23 characters ) FILENAME.jpg
field_image->handler->view->result[0]->_field_data['nid'][entity]->field_image['und'][0]['filename]
->
[key]
.
慕哥6287543
TA贡献1831条经验 获得超10个赞
$field_image->handler->view->result[0]->_field_data['nid']['entity']->field_image['und'][0]['filename']
- 3 回答
- 0 关注
- 425 浏览
添加回答
举报
0/150
提交
取消