News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
The preg_replace_callback() function in PHP
September 10, 2008 @ 11:19:07

DevShed has a new article posted today spotlighting the preg_replace_callback function and how it compares to a normal preg_replace call in some everyday situations.

The preg_replace_callback() function is an under-utilized and little documented PHP function that you will find useful and powerful in many situations, especially if you have been actively using preg_match() and preg_replace(). In this article, you will find a clear explanation of what this function does, together with carefully crafted examples that illustrate some of its uses.

They show how to use it in a few different situations - inside conditional statements, for loops, in a sequence and inside of a class to manipulate matched strings with external functions (both native to PHP and user-defined).

0 comments voice your opinion now!
tutorial pregreplacecallback regular expression


blog comments powered by Disqus

Similar Posts

DevShed: Working with MySQL and Sessions to Serialize Objects in PHP (Part 3)

Web Development Blog: Ajax requests using jQuery and PHP

Christian Wenz's Blog: php|works/db|works 2006

DevShed: Parsing Web Document Nodes with the Tidy Library in PHP 5

DevShed: A Better Way to Determine MIME Types for MIME Email with PHP


Community Events

Don't see your event here?
Let us know!


symfony podcast laravel composer example series introduction community part2 programming interview list framework yii2 language php7 opinion application api project

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework