0

まず、複数の配列で使用する変数をコードで宣言します。これは動作するはずのスニペットですが、動作しません:

変数:

$test = '<div id="test"> dit is een test </div>'; 

配列:

$sections[] = array( 
                'title' => $test, 
                'icon' => '/img/icons/home.png' 
                );  

タイトルは常に空です:-/

ありがとう !!

4

2 に答える 2

1

正しい申告は

$test = '<div id="test"> dit is een test </div>'; 
$sections = array( 
                'title' => $test, 
                'icon' => '/img/icons/home.png' 
                );  
于 2012-07-30T12:12:56.197 に答える
0

このコードで試してください:

$test = '<div id="test"> dit is een test </div>';

$sections['title'] = $test;
$sections['icon'] = '/img/icons/home.png';

echo $sections['title'];
于 2012-07-30T12:06:47.480 に答える