On Thu, 13 Mar 2003 23:17:02 -0500, daniel wrote about "RE: [PHP] trikky string limit question" what the universal translator turned into this:
>never mind i worked it out > >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; > } > } >explodes and splits were not getting the "." properly Why are you using all those variables??? Variables should only be used for things you reuse several times, or plan to be able to change alot later, either manually or programmatically. The more variables you use, the slower it runs. To me it also gets more messy to look at ... Rene -- Rene Brehmer This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php