this kinda relates to another thread a couple down...
ok, so i have the following code at it works fine:
$threadpost = preg_replace("/\[img\](.*?)\[\/img\]/","<img src=\"$1\" alt=\"\" border=\"0\" />",$threadpost);
but, what i'd like to do is calculate the width of the image - which i can do already! - then if the width is less than 400 i'd like the above line to occur, exactly. however if the image is greater than 400 i'd like the line to be executed to be slightly different:
$threadpost = preg_replace("/\[img\](.*?)\[\/img\]/","<img src=\"$1\" alt=\"\" width=\"400\" border=\"0\" />",$threadpost);
hopefully someone can guide me
stew