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

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

WBOY
Release: 2016-06-23 14:01:37
Original
855 people have browsed it

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"] . "";

$args = "'news','项目公告','home/news/news.php?id=".$row[news_id]."'";echo '<a href="#" plain="true" onclick=" newUser('.$args.')" >'.$row['news_title'].'</a>';
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

echo "". $row["news_title"] . "";

有问题,麻烦您再改改,谢谢

echo  $row[news_title]
HTML;

echo "". $row['news_title'] . "";

echo "". $row['news_title'] . "";
改了下

echo "". $row['news_title'] . "";
改了下

echo "". $row['news_title'] . "";
改了下


谢谢

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