Recent Solutions:


Contact

Search

(English only)


RSS Feed

Danltn.com Solutions

Welcome to Danltn.com - This site allows you to find common solutions to many PHP problems, the site is nearly finished and there is an RSS feed if you wish to subscribe.

Solutions

Remove slashes from multidimensional GET and POST

This is the same as the last post (see that for details.) With the exception that this will work for multidimensional arrays, you probably won't need it for most sites, but some might... So here it is.
URL: Download

 PHP Version: Any - Posted by Danltn - Sat, 12 Jul 08 


Remove slashes from GET and POST

A lot of people often complain about the fact that their GET and POST arrays often return data which has backslashes infront of characters such as ' and ".

This is because of a "feature" (notice the quotations) called magic quotes.

The download link shows a small snippet on how to remove these for none-multidimensional arrays (most aren't).
URL: Download

 PHP Version: Any - Posted by Danltn - Fri, 11 Jul 08 


Check if today is Christmas Day

This function is extremely simple but fun nonetheless, all it does in simple terms is tell you whether today (or the date you specified) is Christmas day, if it is then it returns (boolean) true, otherwise it returns (boolean) false, a simple usage of it would be if(is_christmas()) { ... }

Not made for anything serious just have fun with it.
URL: Download

 PHP Version: 4.3+ - Posted by Danltn - Fri, 11 Jul 08