Hey everyone! This problem has been baffling me all day today. I am trying to compare dates which are in the British format to see if they are bigger and/or smaller than todays date. This is what I am using: if($start <= date("d/m/Y") && $end >= date("d/m/Y")){ bla; } PHP: What this should do is compare and see if todays date falls between the $start and $end Where am I going wrong?
When using comparison operators (namely those shown in your example) - require a number (either integer or float) as one of the parameters. The divider (the slash) within your date() is the cause, theirfore remove it to make it a number.
Convert them to unix time stamps and it will work. theres a php function to do it, cant recall of the top of my head what its called though