0

i am using pressflow 6.25 there is a flie views-view-field--events--block--field-date-value.tpl.php in template theme directory

in line 5

$create_date = explode(' ',eregi_replace('<[^>]*>','', $output));

in my web site show this error Unknown error: Function eregi_replace() is deprecated in include() (line 5 of C:\xampp\htdocs\fiddle\sites\all\themes\sttheme\fiddle\templates\views-view-field--events--block--field-date-value.tpl.php). how can i solve my problem?

1 Answer 1

1

There may be a problem with the PHP version.

See HERE

This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

3
  • i change eregi_replace with preg_replace() but show this warning Warning: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier ']' in include() (line 5 of C:\xampp\htdocs\fiddle\sites\all\themes\sttheme\fiddle\templates\views-view-field--events--block--field-date-value.tpl.php). Apr 23, 2012 at 6:16
  • Try to add escaping characters in your preg_replace code or paste your source code here so that someone can help.
    – niksmac
    Apr 23, 2012 at 6:41
  • $create_date = explode(' ',preg_replace('<[^>]*>','', $output)); echo date('d',strtotime($create_date[0])) . '/' . date('m',strtotime($create_date[0])); Apr 23, 2012 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.