I am trying coding a php script where i want to extract a date field from a database table,store this date compare it with todays. To see if the data. from database has pass
Youl could just let MySQL worry about it.
SELECT DATEDIFF(NOW(),enddate) FROM campaigns WHERE id=".$data['camp']
That will return the number of days between the two dates. See the manual for DATEDIFF.