PHP basics

As a kinesthetic learner, my preference when taking a course in code is to build what I’m shown, but tweak, improve, build on and document what I learn as I go along.

Returning to professional web development after a long break, I needed a refresher course in php, so I took a look at the php basics video series from codecourse:

With a series like this, where examples have a minimal front end, I like to build a suitable front-end as I go, shaping it to the needs of the project. To me this is an ideal way to build a site, but isn’t always possible in a client project. Personal projects are ideal for this kind of discipline, and it’s amazing what can come out of it.

I decided to turn my worked examples into a navigable website. I created a single-page site with the content arranged into carousel slides, using the excellent Slick. On the front end, I learned a lot: about combining flexbox with css columns, and it was fun as ever to create some unusual visual effects in css.

I didn’t forget learning php, the original point of the exercise. Investigating php’s native getdate() function, I realised I could easily build a small idea in programming I had years ago while learning javascript – a quirky little calendar to display the Norse god associated with the day of the week. You can see it on the Ifs and Ops slide, but using WordPress’s handy the_content filter I’ve reproduced a version of it below:

The Daily God

Today's deity: máni

Leave a Reply

Your email address will not be published. Required fields are marked *