Welcome Guest, Not a member yet? Register   Sign In
Function int() and now() are undefined
#1

[eluser]cmh24[/eluser]
Hello everybody,

I want to use the above mentioned functions inside my controller.
But when I run the site in my webbrowser, I get the following error:
Call to undefined function.....

What might be the reason?

Thanks!

Greetings
Max

PS: I'm using the latest CI Core and Php 5.3.
#2

[eluser]TWP Marketing[/eluser]
int() and now() are not native php functions. Check intval() in the php docs.

'now' is a timestamp parameter used by the date/time functions: http://php.net/manual/en/function.strtotime.php

'int' can also be used to type cast a parameter to integer format: (int)$somevalue
#3

[eluser]InsiteFX[/eluser]
Something like this!
Code:
$now = date("Y-m-d H:i:s");
$int = (int) $value;

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB