Monday 28 February 2011

HTML over the flash object

Many times I've got the troubles with HTML\CSS while the adding flash objects on the sites. Trying to display CSS popup or stuff like that above the flash object drives me crazy. I've tried even to hide the block that contains object to make it works. But to my surprise to solve this issue was very easy - just set the parameter wmode equal to opaque in object description tags. After that HTML on top of the flash starts working well.

Tuesday 1 February 2011

Strange behavior of strtotime() function

Some of the PHP functions for date manipulation make me surprised. Working on the recent project I faced the problem using function strtotime(). I needed get the list of months one by one from current date.

Seems, everything is simple, I solved this calling the function date("m", strtotime("+ n month")) in loop and got the the list of months I needed. But all the interesting things started from the date 31th of January. I got the list of months with two Marchs.

First I was a loss but then started looking through the documentation for this function and read the comments described this strange behavior of this function.

Not evident behavior leads to big bugs. Be careful working with this function.