How to Create Blog Excerpts with PHP


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

Related Posts
  • Code
    A Guide to Providing Quality Customer SupportQuality customer support
    If you’ve ever released free or premium WordPress Themes or Plugins, you know that launching your new product is not the end of the process. In fact, it’s just the start, and raises a lot of questions: How do you provide support? How do you support customers after they’ve used your product? How do you manage email, social media and forum support easily? Should you support your free products, or just your premium ones? Read More…
  • Web Design
    A Quick Q&A With Jason PamentalJason thumb
    Jason Pamental has been working the web for a long time; so long in fact, he's even used something called "Netscape". This experience, coupled with his passion for responsive design and web typography (amongst many other things) have made him a familiar face on the speaking circuit. I caught up with him, shortly before he heads to London for the Future of Web Design, and fired a few questions his way.Read More…
  • Business
    Raising Money For Your Business Through Crowdfunding4 preview raising money crowdfunding business
    As our series on funding a business continues, today we look at crowdfunding. How do you create a successful crowdfunding campaign? What are the pros and cons of this method? Should you offer rewards or equity? Read on for the full scoop.Read More…
  • Photography
    Photography Fundamentals
    Best Practices for Presenting a Photo Portfolio OnlineZenfolio prelg
    Having a professional website to showcase your photography is an essential tool that every photographer needs. However, finding the right platform and means for presenting your work can be a headache. Thankfully though, the guys at Zenfolio have developed a series of tools that allow you to create a personalised online portfolio, giving you everything you need to run your photographic business.Read More…
  • Crafts & DIY
    Meet the Maker: Marinke Slump (aka Wink) of A Creative Being400pxclose up2a
    Netherlands-based Marinke Slump (aka Wink) is a crocheter and the girl behind the popular crochet blog, A Creative Being. She's also a crochet instructor for Crafttuts+. Today we chat to her about her brightly coloured 'boho chic' work, working from home and her marketing strategies.Read More…
  • Business
    Two Very Different Ways to Create a Profitable Authority Blog2 profitable authority blog
    The journey to building a blog that generates a sizeable passive income is fraught with challenges. Of those challenges, the very first one you face is arguably the most pivotal and the most paralyzing. In fact, this first challenge often stops people from starting a blog at all. I am talking about your blog's topic. The decision as to what your blog will be about is likely to be a key defining factor in its success, and yet when you're first starting out you're hardly less qualified to make the right decision. The whole process can seem utterly overwhelming and the fear of getting it "wrong" can prevent you from making any decision at all. With that in mind, in this post I want to equip you with the understanding you will need to make an informed decision about your blog's topic. I am going to reveal the two very different options you have when it comes to picking a topic for your authority blog -- two options which, when combined, enable anyone to create a successful and profitable blog. First, let's address some concerns you may have about authority blogging.Read More…