/ Published in: PHP
Sometimes you may need to change image properties 'on-the-fly'. The best example is when you want to display blog post short description, retrieve the first image and try to turn it into the thumbnail: change some properties and add a special class name.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $postText = '..includes html + image tags'; // find first image and redo it echo $postThumbnail; echo $postText; ?>
URL: http://www.apphp.com/index.php?snippet=php-change-image-properties-on-fly