64x64 icon dark hosting
Choose a hosting plan here and get a free year's subscription to Tuts+ (worth $180).
Advertisement

How to Create Blog Excerpts with PHP

by
Gift

Start a hosting plan from $3.92/mo and get a free year on Tuts+ (normally $180)

Ever visited a blog, and noticed that each posting’s body only contained a hundred characters or so, which is then followed by “…”? Ever wonder how to do that yourself without utilizing a CMS? It’s not quite as easy as you might think. In this video tutorial, I’ll show you how to do this, as well as a host of other neat little things, like working with MySQL’s LEFT() function, using PHP’s strrpos, and substr, creating the beginning’s of an actual blog, and more. It’s only fifteen minutes, so let’s dig in!


Full Screencast


Advertisement