$pos && $npos < $len ) { $pos = $npos; } } if ( !$pos ) { // substr $len-3, because the ellipsis adds 3 chars return substr($str, 0, $len-3) . '...'; } else { // $pos+1 to grab punctuation mark return substr($str, 0, $pos+1); } } $mystring = <<

Big pink monster makes his scary face!

scarey_monster_scares_you.jpg

Rawr!

EOD; echo ''; ?>
Morning monster needs his coffee Morning monster needs his coffee Toast for dinner Toast for dinner Purple monster turns red! Purple monster turns red! One purple monster eats curry One purple monster eats curry Watch out for bad weather Watch out for bad weather A monster and his book. A monster and his book. Three red monsters Three red monsters How are the monsters made? How are the monsters made? Today's Insta-Monster! Today's Insta-Monster! Give a monster his pants. Give a monster his pants.

Kristen's monsters are here to tell you about .

Big pink monster makes his scary face!

scarey_monster_scares_you.jpg

Rawr!

Rawr! Pink monster makes a face.

Monday, February 9, 2009

Big pink monster makes his scary face!

scarey_monster_scares_you.jpg

Rawr!

Rawr! Pink monster makes a face.

Big pink monster makes his scary face!

scarey_monster_scares_you.jpg

Rawr!