Functions
PHP Function: str_remove()
Thought it’d be useful and make more sense to make a str_remove() function because there isn’t one.
SHARETHIS.addEntry({ title: “PHP Function: str_remove()”, url: “http://www.arkinex.com/php/functions/31/php-function-str_remove/” });
List all links on a website using DOM
Have you heard of DOM before? If not it stands for Document Object Model and is a method of accessing XML or XHTML page elements (tags) and attributes, such as <book_title> in XML or <img src=”pie.jpg”> in XHTML (’src’ being the attribute).
Once you start playing with DOM you realize the massive potential it has for [...]
PHP Function: dir_list_images()
This function will make an array of all the images in a directory, it will even include all subdirectories by default.
Again, I built this function for a friend who wanted to batch modify all the images using ImageMagick / GD2.
SHARETHIS.addEntry({ title: “PHP Function: dir_list_images()”, url: “http://www.arkinex.com/php/functions/17/php-function-dir_list_images/” });
PHP Function: format_filesize()
This function allows you to make user readable filesizes easily.
Example: ‘1024′ into ‘1Kb’.
SHARETHIS.addEntry({ title: “PHP Function: format_filesize()”, url: “http://www.arkinex.com/php/functions/14/format_filesize-to-get-user-readable-file-sizes/” });
PHP Function: duration()
This function will turn a unix timestamp into a user readable time.
Example: 115023234 into 1 day, 25 minutes ago.
SHARETHIS.addEntry({ title: “PHP Function: duration()”, url: “http://www.arkinex.com/php/functions/13/php-function-duration/” });
PHP Function: config_load()
A very basic configuration file (ini style) parser for PHP 4 & 5.
It is all easily saved to a variable.
SHARETHIS.addEntry({ title: “PHP Function: config_load()”, url: “http://www.arkinex.com/php/functions/6/config-parser-small/” });
