我试图让用户年龄,我得到正确的输出,但在我的 html 页面中有警告
错误:
A PHP Error was encountered
Severity: Notice
Message: A non well formed numeric value encountered
Filename: controllers/users.php
Line Number: 45
我使用的代码是:
$now = time();
$data['dob'] = strftime('%Y', $now)-strftime('%Y',$query['dob']); //it should be showig user age
上面显示的错误可能是什么原因,请帮助