O'Reilly logo

PHP and MySQL Recipes: A Problem-Solution Approach, Second Edition by Frank M. Kromann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Frank M. Kromann 2016

Frank M. Kromann, PHP and MySQL Recipes, 10.1007/978-1-4842-0605-8_9

9. Regular Expressions

Frank M. Kromann

(1)Trabuco Canyon, California, USA

PHP is often described as a templating language where HTML sections and script are mixed to generate HTML documents for rendering in a browser. As the web technology is advancing PHP is used to generate other types of content (JSON, see chapter 14; and images see chapter 8, etc.) and the PHP scripts contain less embedded HTML sections. Instead the script will read a template from disk or a database and perform string replacements on the content before sending it to the client.

Simple string replacements can be done with the str_replace() function , but this function will replace a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required