Twigの攻略法を考えよう【Smarty系】at PHPTwigの攻略法を考えよう【Smarty系】 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト29:nobodyさん 24/06/22 19:32:00.08 seExgP6zy 北海道ヨーグルトと十勝ヨーグルトは どっちがおいしいか悩んでるんだナ 30:nobodyさん 24/06/22 19:58:25.76 seExgP6zy index.php <?php require_once 'vendor\autoload.php'; $loader = new \Twig\Loader\FilesystemLoader('templates/'); $family = ["Baby","Mommy","Daddy","Grandma","Grandpa","Let's go hunt","Run away","Safe at last","It's the end"]; $j = 0;$sharkss = "";foreach($family as $item){ $suffix2 = " shark";if($j>4){$suffix = "";} for($i = 0; $i<3; $i++){ $sharkss =$sharkss.$item."".", doo doo doo doo doo doo\n";} $sharkss = $sharkss.$item.""."!\n";$j++;} $twig = new \Twig\Environment($loader, []); echo $twig->render('ind.html', ['name2'=>$sharkss."".$suffix,'logo1'=>$suffix2]); ?> 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch