<?php

require_once('MySmarty.php');

/**
 * プルダウン表示用データの作成
 *
 * @return array
 */
function makePullDownArray()
{
    return array(
        0 => "",
        1 => "",
        2 => "黄色",
        3 => "",
        4 => "",
        5 => "浅黄色"
        );
}

// 
$smarty = new MySmarty();

// Smarty表示用の配列を作成
$printArray = array();
for($i = 0; $i <= 5; ++$i){
    $printArray[] = array(
        "no" => $i,
        "color" => makePullDownArray(),
        "color_select" => $i
    );
}

// Smartyでの表示処理
$smarty->assign("colorArray", $printArray);
$smarty->display('pulldown.html');

?>