【5:1】シャークっぽいSmartyを作った
- 1 名前:ドナルドマクロ :2024/06/19(水) 19:16:23.02 ID:uJR8IweHP
- <?php
require_once 'smarty/libs/Smarty.class.php'; $smarty = new Smarty(); $smarty->template_dir = 'templates/';$smarty->compile_dir = 'templates_c/'; $sharks = array(1=>"Baby",2=>"Mommy",3=>"Daddy",4=>"Grandma",5=>"Grandpa");$doo = ""; for($i = 1; $i < 6; $i++) {for($j = 0; $j < 3; $j++) {$doo = $doo.$sharks[$i]. " "; ; for($k = 0; $k < 6; $k++) {$doo = $doo."doo ";}$doo = $doo."\n";} $doo = $doo.$sharks[$i] . "\n";}$smarty->assign('title', 'sharks'); $smarty->assign('shark1', $doo);$smarty->assign('shark2', $sharks); $smarty->display('test.html'); ?> <html lang='ja'> <head><meta http-equiv='content-type' content='text/html; charset=UTF-8'> <title>{$title|escape}</title></head> <body text='black' bgcolor='white'> <div align='center'><h2>KIDS SONG</h2> (省略されました。全て読むならスレ表示で。。。)
-
- 全部読む 最新50 1-100 板のトップ リロード
|