Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php echo内部的问题_Php_Echo_Quotes_Double Quotes - Fatal编程技术网

Php echo内部的问题

Php echo内部的问题,php,echo,quotes,double-quotes,Php,Echo,Quotes,Double Quotes,我想把这一行放到echo中: 我怎样才能做到这一点,请,我有问题的报价 提前谢谢。试试这个,可能有用 echo "<a title='Details' href='produit.php?Id_Produit=" .$row["id_produit"]. "'"><img src='photos_produits".$row["image_url"]. "'/></a>" 使用最简单的 你错过了几个。注意:我发现为php解析单引号和为html使用双引号要容易

我想把这一行放到echo中:

我怎样才能做到这一点,请,我有问题的报价


提前谢谢。

试试这个,可能有用

echo "<a title='Details' href='produit.php?Id_Produit=" .$row["id_produit"]. "'"><img src='photos_produits".$row["image_url"]. "'/></a>"
使用最简单的


你错过了几个。注意:我发现为php解析单引号和为html使用双引号要容易得多,而且不需要转义它们
echo "<a title='Details' href='produit.php?Id_Produit=" .$row["id_produit"]. "'"><img src='photos_produits".$row["image_url"]. "'/></a>"
$str = <<<ANCHOR
<a title="Details" href="produit.php?Id_Produit={$row["id_produit"]}"><img src="photos_produits/{$row["image_url"]}"></a>
ANCHOR; // make sure there is no extra spaces at the start of this line

echo $str;