PHP Code Snippets

PHP Snippets tagged as preg_replace_callback
David Carr

This snippet looks inside a $content variable and looks for all img tags and extracts the src path and created a new img tag from them. This allows classes to be added to images.

Read more

David Carr

Converts a human readable file size value to a number of bytes that it represents. Supports the following modifiers: K, M, G and T. Invalid input is returned unchanged.

Read more

Copyright © 2011 - 2017 created by David Carr Web Developer. All code MIT license. All rights reserved. Built using Simple MVC Framework