preg_match('%\[img\](.*?)\[/img\]%si', $subject, $imgsrc); echo $imgsrc[1];
if(strlen($var)>1){ true; }