xtheonex


Member since 01/27/2009

Name: David Cooke

Location: Derbyshire, UK

Website: http://jadeyo.com/

7 snippets

2054 profile views

2 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

xtheonex's Recent Snippets



« Prev 1 Next »
A lovely little one liner that strips out all non alphanumeric chars first, then replaces the spaces with hyphens, then converts all to lowercase :D
0 650 posted 15 years ago by xtheonex
This is a basic shell for PayPal IPN. It is by no means a complete solution, but it should provide a good starting point for anyone that wants to work out IPN. Or it can be used as is to do basic IPN.
2 780 posted 15 years ago by xtheonex
I use this snippet to force a number to 2 decimal places. Eg, For prices, PHP rounds the number 22.20 to 22.2. This code forces a zero on the end if there isn't 2 decimal places already.
1 849 posted 15 years ago by xtheonex
This little piece of code will convert to US phone format, as typed. Eg, As the number "0000000000" was typed, it would convert it to (000)-000-0000.
6 3583 posted 15 years ago by xtheonex
Function to return the current page name, without the location of it... Eg, for the URL http://localhost/www/someproject/index.php, this would return index.php
1 702 posted 15 years ago by xtheonex
A quick, usefull function which i use to convert a date/time string pulled from MySQL, into a readable format.
1 869 posted 15 years ago by xtheonex
This is by no means the most efficient way to do this, in terms of performance. It is however the easiest way.
1 785 posted 15 years ago by xtheonex
« Prev 1 Next »