iloveitaly


Member since 04/11/2007

Website: http://mabblog.com/

35 snippets

8056 profile views

3 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

iloveitaly's Recent PHP Snippets



« Prev 1 2
Format's var export so things looks a little bit nicer
0 639 posted 12 years ago by iloveitaly
0 724 posted 12 years ago by iloveitaly
I'm not well versed in international address formatting, but this seems to work for most cases. Critiques are welcome!
0 567 posted 13 years ago by iloveitaly
Useful when used with the google map directions function http://snipplr.com/view/15530/php-create-google-map-directions-link/
0 674 posted 13 years ago by iloveitaly
0 665 posted 13 years ago by iloveitaly
0 794 posted 13 years ago by iloveitaly
Assumes that the record has a `name` field which represents the name of the location and always has a defined two character `country` field.
0 664 posted 13 years ago by iloveitaly
like array_search but compares against a specific key in each element of the array
2 743 posted 13 years ago by iloveitaly
0 542 posted 13 years ago by iloveitaly
1 665 posted 13 years ago by iloveitaly
Before: ` Array ( [0] => Array ( [total_sessions] => 24 [study_type_id] => 1 ) [1] => Array ( [total_sessions] => 24 [study_type_id] => 2 )...
0 526 posted 14 years ago by iloveitaly
0 423 posted 14 years ago by iloveitaly
0 743 posted 14 years ago by iloveitaly
0 573 posted 14 years ago by iloveitaly
Useful for controllers. Put this in your base class for easy caching on variable (GET, POST) dependent pages
0 552 posted 14 years ago by iloveitaly
Using the kohana framework for XSS protection
0 673 posted 14 years ago by iloveitaly
0 571 posted 14 years ago by iloveitaly
Convenience function to set a SimpleXMLElement's attributes quickly.
0 559 posted 14 years ago by iloveitaly
0 394 posted 14 years ago by iloveitaly
Like python's os.listdir
1 843 posted 14 years ago by iloveitaly
0 368 posted 14 years ago by iloveitaly
Construct DateTime object with unix timestamp
0 557 posted 14 years ago by iloveitaly
like array_key_exists but accepts an array of key values to check
0 439 posted 14 years ago by iloveitaly
this function processes a URL that 'should' be a full url (i.e. http://something.com/dfsdfs/) and makes sure it contains http:// for easy inclusion as a link into a href attribute
0 522 posted 14 years ago by iloveitaly
2 824 posted 14 years ago by iloveitaly
2 810 posted 14 years ago by iloveitaly
« Prev 1 2