Hello people.. I have written a code that replaces IMG tags in a text with the HTML <img tag.. However, I faced a problem; Big images spoiled the layout of the page being viewed.
Is there anyway to limit the size of the image only when it's more than 300 wide and 400 high??
This is my code:
$Txt = $_POST['Text'];
$arrA = array('[img]','[/img]');
$arrB = array('<img src="','">');
$Txt = stri_replace($arrA,$arrB,$Txt);
echo $Txt;
So I want to set the size limits as: 300,400.