我有一个 PHP 文件设置如下:if ($preference == "Vegetarian"){ $meal = "Vegetarian" $gluten_free_option = "(Click here to change order to gluten-free)";}echo " <h3>Meal Choice: $meal $gluten_free_option</h3>"并尝试生成以下输出:Meal Choice: Vegetarian (Click here to change order to gluten-free)其中括号文本将链接到无麸质菜单页面。是否可以在变量 $gluten_free_option 中插入 href 链接?
1 回答
慕尼黑5688855
TA贡献1848条经验 获得超2个赞
是的
$gluten_free_option = "<a href='URL HERE'>(Click here to change order to gluten-free)</a>";
- 1 回答
- 0 关注
- 136 浏览
添加回答
举报
0/150
提交
取消