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

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

WBOY
WBOYOriginal
2016-06-23 14:01:37831browse

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


要把这个输出出来,改了部分,单引号双引号嵌套绕晕了,该怎么改?求指教


回复讨论(解决方案)

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>';

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

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'] . "";
改了下


谢谢

Statement:
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