I had no idea something like this existed but what a great idea. 24 days of worth of PHP articles to keep the Christmas Blues away. Today’s article is something very close to my heart and discusses the topic of Comprehensible Code. Go, read, expand your minds….
You could simply code: but thats the “noob” way, a real coder creates a function… Update: 13/05/2018 Sigh What was wrong with me back then, this would have been so much better. Keep it simple, stupid!
It has been a while since I have posted here, mainly due to the time consuming period that is the festive season and also because I am discovering that I am getting fairly annoyed by Drupal as a blog tool and am trying out the new WordPress as an alternative. For now I have a… Continue reading Life of a developer
Here’s one line of code to get the last day of a month: $last_day = date(‘t’, mktime(0, 0, 1, $month_variable, 1, $year_variable)); How much more difficult do you want it to be ???
As a PHP developer of almost four years now, I often still come across little problems in coding that make me do the good ol Google search to find the answer. (someday I will have memorised the entire PHP manual, but today is not that day ;-). Anyway today I was asked about how to… Continue reading Delving deeper into the PHP lake…testing if a variable exists in a list
Whenever I have to output a numbered list of data I usually run the following code to achieve the required result. but I have discovered a lovely little function that does all this for me. now I simply call and it automatically outputs the next numeric. Great! Simple and easy to use…..that’s the way to… Continue reading Simple PHP increment function