$str = "Ipod batteries for Apple Ipod PDAs. Replacement batteries from Laptops for Less.com.url"; $short = substr($str, 0, 20);