Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged convert



1 2 Next »
0 636 posted 14 years ago by yazu
Takes a number in bytes and returns the number in (KB,MB,GB) for human-readable format.
1 507 posted 14 years ago by stancox
convert a string to it's hex representation and back
0 486 posted 14 years ago by dygor
Ever needed to convert rgb to hex on your website, maybe you have a slider that handles rgb but your backend uses hex, this issue can be resolved easily be using the following code. Remember to keep in mind that php and html primarily uses hex colo...
1 663 posted 14 years ago by scopefragger
This function converts file size in bytes to the larger units. You can add bigger values like exa-, zetta-, yotta- bytes.
0 588 posted 14 years ago by kirik
Recently moved my Wordpress blog to a tumblr account while I was removing a hosting account, wrote this script to do the transfer for me using Wordpress' Export feature and Tumblr's API. It's rough around the edges but gets the job done!
2 1096 posted 14 years ago by shakefon
To convert links on a twitter status to a clickable url. Also convert @ to follow link, and # to search
3 952 posted 15 years ago by mardix
So. You have some minutes and want a "human readable" version? Sure thing baby!
2 5654 posted 15 years ago by optimal
Useful for taking incorrectly-formatted UTF-8 strings containing HTML data, and converting them to correctly-formatted UTF-8 plain text. A handy tool for displaying HTML stored in a database.
4 1583 posted 15 years ago by X3Maverick
My friend Jamal Fanaian showed me how to convert a string to its' ASCII value.
0 2891 posted 15 years ago by luizlopes
Convert an number to a position / ranking. 1 becomes 1st, 2 becomes 2nd, etc...
2 840 posted 15 years ago by distinctdev
Diese Funktion wendelt Entities in HTML Quellcode um, ohne dabei den HTML Quellcode zu zerstören.
1 720 posted 16 years ago by OscarWilde
2 673 posted 16 years ago by evanwalsh
3 994 posted 16 years ago by DeadLy
Convert 12hs format to 24hs format. In example: 10:00:00 a.m. return timestamp for 22:00. Or use: strtotime('1970-01-01 '.$hora);
1 584 posted 16 years ago by nicolaspar
1 2 Next »