Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged convert



1 2 Next »
0 1545 posted 15 years ago by loric
0 1272 posted 15 years ago by yazu
Takes a number in bytes and returns the number in (KB,MB,GB) for human-readable format.
1 1141 posted 16 years ago by stancox
convert a string to it's hex representation and back
0 1009 posted 16 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 1331 posted 16 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 1183 posted 16 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 2125 posted 16 years ago by shakefon
To convert links on a twitter status to a clickable url. Also convert @ to follow link, and # to search
3 1721 posted 16 years ago by mardix
So. You have some minutes and want a "human readable" version? Sure thing baby!
2 8232 posted 16 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 2666 posted 16 years ago by X3Maverick
My friend Jamal Fanaian showed me how to convert a string to its' ASCII value.
0 3770 posted 16 years ago by luizlopes
Convert an number to a position / ranking. 1 becomes 1st, 2 becomes 2nd, etc...
2 1967 posted 17 years ago by distinctdev
Diese Funktion wendelt Entities in HTML Quellcode um, ohne dabei den HTML Quellcode zu zerstören.
1 1397 posted 17 years ago by OscarWilde
2 1601 posted 17 years ago by evanwalsh
3 1958 posted 17 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 1206 posted 18 years ago by nicolaspar
1 2 Next »