基本上只是想知道是否可以使用 if 语句class
向我的div
哪个我添加一个。echo
我的代码:
$currentpage = $_SERVER['REQUEST_URI'];
if ($currentpage == "/room/penthouse-suite/"){
echo "<div class="' .text-center text-emphasis text-lg. '">test
penthouse</div>";
}
elseif ($currentpage == "/room/garden-room/"){
echo "<div class="text-center text-emphasis text-lg">test garden</div>";
}
elseif ($currentpage == "/room/ocean-suite/"){
echo "<div class='text-center text-emphasis text-lg'>test ocean</div>";
}
elseif ($currentpage == "/room/mountain-suite/"){
echo "<div class='text-center text-emphasis text-lg'>test mountain</div>";
}
如您所见,我确实尝试了几种方法,但没有成功。