hi guys , i assumed i had this working but i stand corrected, it basically will get the first dot in content which should denote a end of paragraph and show that as a preview, although say i put g.w bush in it will split off there which i dont want , is there a way i can do this with a paragraph that may look like this
rweqijr riopjwrpioqwrj pqwrojrqwiopj rqwpjwrio oqrwqwriojwqijwroij. iojwrqioj where the dot and space should denote a paragraph or rweqijr riopjwrpioqwrj pqwrojrqwiopj rqwpjwrio oqrwqwriojwqijwroij ojwrqioj. wejkqwqwpokwrop rqpokqwopr poqwrkp oqwrkw where the newline should denote a pagraph, let me know thanks. function create_caption($content,$max_length,$primaryID,$ID) { if (strlen($content) > $max_length) { $paragraph_i="."; $position=strpos($content,$paragraph_i); if (is_integer($position)) { $preview=substr($content,0,$position); $preview.=" [ <a href=\"".$GLOBAL['PHP_SELF']."?".$primaryID."=".$ID."\"> More </a>]"; return $preview; } } else { return $content; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php