So PHP has some pretty helpful native functions like isset() and empty() which can be used to check if a variable exists and if it has a value, respectively. For those of you who don’t know, if you try to use the value of a variable that, for some reason, doesn’t exist at that point in the code your users will see a lovely error right on the page. Say if you have optional fields on a form, you can use isset($_POST[‘my_optional_field_1’]) before trying to get it’s value – because if the field was empty on form submission then my_optional_field_1 won’t be in the $_POST variable and you’ll generate an…
Why isn’t “<date> to now” a thing on Google that tells you how long ago that date was? I mean, I get the little card thing for Barack Obama’s height. It even has a calculator and automatically converts a bunch of stuff for you, so why not date differentials?
Hover over the links in my posts, sometimes I put extra info, trivia or "jokes" in the title text!
The views expressed in the articles and pages of this site are my own and it shouldn't be assumed that they are representative of any organisations I am a part of.
Also, my rants contain a lot of bad language so if you're offended by that kind of thing turn back now.
Tweety TweetsMy Tweets