note 78294 rejected from function.mktime by nlopess

From: Date: Fri, 05 Oct 2007 14:55:49 +0000
Subject: note 78294 rejected from function.mktime by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-131140@lists.php.net to get a copy of this message
Note Submitter: raqohashi at gmail dot com ---- This is the problem: Warning: mktime() expects parameter 4 to be long, string given in C:\xampp\xampp\htdocs\protocolo\uftodos2.php on line 36 And this is the code: function date_diff($from, $to) { list($from_month, $from_day, $from_year) = explode("-", $from); list($to_month, $to_day, $to_year) = explode("-", $to); $from_date = mktime(0,0,0,$from_month,$from_day,$from_year); $to_date = mktime(0,0,0,$to_month,$to_day,$to_year); $days = ($to_date - $from_date)/86400; return ceil($days); } I need help...

« previous php.notes (#131140) next »