Skip to main content

Formatting Text and Dates

  • Chapter
  • First Online:
PHP Solutions
  • 2607 Accesses

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 David Powers

About this chapter

Cite this chapter

Powers, D. (2014). Formatting Text and Dates. In: PHP Solutions. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0635-5_14

Download citation

Publish with us

Policies and ethics