[英]I'm trying to create an unordered list in php and display it to html file
[英]I'm trying to add HTML into a PHP array
它不像我在其他地方看到的所有其他示例那樣的表單,而是我用來根據用戶單擊的內容將內容動態加載到單個網頁的大型數組。 我想將一些項目鏈接到某些網站。
$cosmeticServices = array(
injections => array(
"title" => "Toxin Injections",
"picture" => "img here",
"content" => "Toxin injection solutions include:"?><a href="google.com">®Botox,</a><?php"®Xeomin, ®Juveau, ®Dysport"
),
數組中有更多的項目,這就是括號后有逗號的原因。 我已經嘗試使用單引號、雙引號、更改引號的位置以及不退出 PHP,只需在 php 字符串中包含 HTML 即可。 這是我最新的嘗試,退出 PHP 並插入 HTML,但根本不起作用。 很多錯誤消息來自它。
我認為你的意思是逃避雙引號
"content" => "Toxin injection solutions include: <a href=\"https://botox.com\">®Botox,</a>®Xeomin, ®Juveau, ®Dysport"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.