Get the Intro: PHP Paragraph Regular Expression
Recently I was playing around with WordPress' wp_posts table. I wanted to grab the basic information about my posts (ID, title, content, slug) and build a quick summary list of them. One problem I ran into was creating a content "intro." Luckily a quick regular expression allowed me to create the intro.
$intro = strip_tags($matches); //removes anchors and other tags from the intro
The above code extracts the first paragraph in a string. Since all of my posts begin with an introductory paragraph, this type of system will work.
For quite a long time now websites with the so called "parallax" effect have been really popular.
In case you have not heard of this effect, it basically includes different layers of images that are moving in different directions or with different speed. This leads to a...