<?php
$name=DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, "US");
print_r($name);
?>
Working fine in localhost. But when i am trying it online i m getting error Fatal error: Undefined class constant ‘PER_COUNTRY’ on line 1
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That is a PHP 5.3 or greater function. So your server version on your live server is not >= PHP 5.3
See here: http://www.php.net/manual/en/datetimezone.listidentifiers.php