Answer the question
In order to leave comments, you need to log in
Correct writing?
Good afternoon. I figured out how to do one task correctly, but I want the opinion of a couple more people :) I wrote this bullshit echo
echo '<li><div class="images-tovar"><img src="'.$img_path.'"width="'.$width.'"height="'.$height.'"></div>
<p class = "style-title"><a href="view_content?id='.$row["products_id"].'">'.$row["title"].'</a></p>
<ul class = "reviews">
<li><img src=""></li>
<li><img src=""><input type="submit" value="Купить" class="button7"></li>
<a class ="add-cart"></a>
<p class="style-price"><strong>'.$row["price"].' </strong>грн. </p>
<div class = "description">'.$row["features"].'</div>
</ul>
</li>
'
Answer the question
In order to leave comments, you need to log in
Yes, you're right, it's better to put templates in separate files. You can also check out popular templating engines such as twig, blade, smarty, and so on. Even if you do not use them, look at least a brief overview of their capabilities and principles of work - get ideas.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question