Guys, please tell me why my pictures are not displayed in the specified px, and on the site only the original is displayed. Che wrong in this code?
if ($row["imagesad"] != "" && file_exists("ph_main/" . $row["imagesad"])) { $img_path = 'ph_main/' . $row["imagesad"]; $max_width = 114; $max_height = 105; list($width, $height) = getimagesize($img_path); $ratioh = $max_height / $height; $ratiow = $max_width / $width; $ratio = min($ratioh, $ratiow); $width = intval($ratio * $width); $height = intval($ratio * $height); } else { $img_path = "images/no-image.png"; $width = 110; $height = 200; } echo ' <li> <div class="block-images-grid"> <img src="ph_main/' . $row[" imagesad"] . '"> </div> <p class="style-title-grid"><a href="">' . $row["title"] . '</a></p> <ul class="reviews-and-counts-grid"> <li><img src="images/eye-icon.png"> <p>0</p></li> <li><img src="images/comment-icon.png"> <p>0</p></li> </ul> <p class="style-price-grid"><strong></strong></p> <div class="mini-features"> <p>Город:</p> <p>Дата:</p> </div> </li> '; }
$img_path
,$width
and$height
in code? - Visman