CHAPTER 14

image

Formatting Text and Dates

We have some unfinished business left over from the previous chapter. Figure 13-1 in Chapter 13 shows content from the blog table with just the first two sentences of each article displayed and a link to the rest of the article. However, I didn’t show you how it was done. There are several ways to extract a shorter piece of text from the beginning of a longer one. Some are rather crude and usually leave you with a broken word at the end. In this chapter, you’ll learn how to extract complete sentences.

The other unfinished business is that the full list of articles in blog_list_mysqli.php and blog_list_pdo.php ...

Get PHP Solutions: Dynamic Web Design Made Easy, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.