echo 双引号里面的双引号问题

Echo double quotes inside double quotes issue

如何在 PHP 回显双引号中使用双引号? class "problem" 是个问题。

 echo " new function('<span class="problem"></span>');";

试试这个方法

echo <<<END
All the text u wanna echo
u can use double and single quotes
END;

这样试试..

echo "new function('<span class=\"problem\"></span>');";

希望有用