我正在尝试在using中创建一个block
内部,但到目前为止没有成功。sub block
.docx
openTBS
这是我的PHP
array
:
$myBlock = array(
0 => array(
'description' => 'description1',
'name' => 'name1',
'photos' => array (
0 => array(
'path' => 'C:\path_to\pic_0000y.png',
'name' => 'photo0000'),
1 => array(
'path' => 'C:\path_to\pic_1111y.png',
'name' => 'photo111'),
), // end of photo array
), // end of first element
1 => array(
'description' => 'description2',
'name' => 'name2',
'photos' => array (
0 => array(
'path' => 'C:\path_to\pic_3333y.png',
'name' => 'photo3333'),
1 => array(
'path' => 'C:\path_to\pic_00000.png',
'name' => 'photo00000'),
), // end of photo array
), // end of second element
);
我正在TBS
像这样合并:
$this->TBS->MergeBlock( 'myBlock', $myBlock);
相当于php
我想要实现的目标:
foreach( $myBlock as $myBlockKey => $myBlockData)
{
echo $myBlockData['description'];
echo $myBlockData['name'];
foreach( $myBlockData['photos'] as $photoKey => $photoData)
{
echo $photoData['name'];
echo $photoData['path'];
}
}
这将显示:
description1
name1
photo0000
C:\path_to\pic_0000y.png
photo111
C:\path_to\pic_1111y.png
description2
name2
photo3333
C:\path_to\pic_3333y.png
photo0000
C:\path_to\pic_0000y.png
我想发布我尝试过的错误内容并没有多大意义,但这几乎就是我试图做的:
[myBlock; block=begin;]
[myBlock.description]
[myBlock.name]
[myBlock.photos; block = begin;] // where it fails
[myBlock.photos.path] // where it fails
[myBlock.photos.name] // where it fails
[myBlock.photos; block=end;] // where it fails
[myBlock; block=end;]