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

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.

| improve this answer | |
  • 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). – mehdi jalali Apr 23 '12 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 '12 at 6:41
  • $create_date = explode(' ',preg_replace('<[^>]*>','', $output)); echo date('d',strtotime($create_date[0])) . '/' . date('m',strtotime($create_date[0])); – mehdi jalali Apr 23 '12 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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