Home > Backend Development > PHP Tutorial > PHP 字符串连接,求大神编者,解答

PHP 字符串连接,求大神编者,解答

WBOY
Release: 2016-06-13 11:49:35
Original
737 people have browsed it

PHP 字符串连接,求大神编辑,解答

echo "<a href="#" plain="true" onclick="newUser('news','项目公告','home/news/news.php?id= . $row[news_id] ')>". $row["news_title"] . "</a>";
Copy after login


要把这个输出出来,改了部分,单引号双引号嵌套绕晕了,该怎么改?求指教
------解决方案--------------------
echo "". $row["news_title"] . "";
------解决方案--------------------
<br />$args = "'news','项目公告','home/news/news.php?id=".$row[news_id]."'";<br />echo '<a href="#" plain="true" onclick=" newUser('.$args.')" >'.$row['news_title'].'</a>';<br />
Copy after login

------解决方案--------------------
echo "<a href='#' plain='true' onclick=\'newUser('news','项目公告','home/news/news.php?id= ".$row['news_id']."')'>". $row['news_title'] . "</a>";
Copy after login

------解决方案--------------------

本帖最后由 xuzuning 于 2014-02-28 09:26:01 编辑 echo $row[news_title]
HTML;


------解决方案--------------------
echo "". $row['news_title'] . "";
改了下
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template