Profile
Achievement
iloveitaly's Recent PHP Snippets
- All /
I'm not well versed in international address formatting, but this seems to work for most cases. Critiques are welcome!
0
548
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
656
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
645
posted 13 years ago by iloveitaly
like array_search but compares against a specific key in each element of the array
2
733
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
513
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
535
posted 14 years ago by iloveitaly
Convenience function to set a SimpleXMLElement's attributes quickly.
0
542
posted 14 years ago by iloveitaly
like array_key_exists but accepts an array of key values to check
0
427
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
504
posted 14 years ago by iloveitaly