PHP and jQuery – Reduce Long String to Preview Length and Reveal Full Text OnClick

Goal: Reduce long string to specified length for end-user preview.  Reveal entire string when clicked.  Go back to preview when clicked again. See Example Step 1: PHP Code [code] static function ReduceStringForPreview($text,$size=100) { define($reduced,”); if(strlen($text) > $size) { $reduced .=…

Read More