i keep getting this error on the car_detail.php page on my database
Warning: date() expects parameter 2 to be long, string given in /home/speedycm/public_html/speedyautos/cars_class.php on line 228*
cars_class.php reads this on line 228
$this->expiry_date = date("m/d/Y", $rows['expiry_date']);
how can i resolve this?
date() expects a unix timestamp... I imagine you are passing it a date as a string.
e.g. 2010-10-10
You should use:
Or better yet, use the DateTime object.