2 Mitul Dabhi answered Nov 30 '-1 00:00 function strwrap($content){ if(strlen($content)>150){ return substr(strip_tags($content),0,150)."..."; } else { return $content; } } Edit Answer