-3
The following code is part of a php script that I’m developing, it works, but I feel like I’m writing a gambiarra because of the placement of the quotes and double quotes. Can you tell me if I can leave the code just like that?
print '<div class="titleebay"><a rel="nofollow" href="'. $product['link_produto'] . '">"' . $product['nome'] . '"</a></div>';
print '<div class="mainproduct"><a rel="nofollow" href="' . $product['link_produto'] . '"><img style="height:120px" src="' . $product['link_imagem'] . '"/><br/>';
//print "De:; R$". $preco_normal . "<br/>";
print '<span>Apenas R$"' . $product['preco_promocao'] . '"<br/></a></span></div>';
//print "Em " . $parcelas . "x de : R$" . $vl_parcelas . "</a></span></div>";
}
You can use the
printf()
or here/Nowdoc in place of these prints.– rray
There is no "dislike" in stackoveflow, but downvotes. And they usually point to poor quality questions, lack of more information about the problem or lack of clarity.
– user28595
What kinds of questions should I avoid asking?
– user28595
Big differences, man, like trading Satan for Lucifer. The question is very clear.'
– user013314