below code is giving me the fatal error in php 7
$jquery_click_hook = ereg_replace("[^A-Za-z0-9]", "", strtolower($value['name']));
is there any way to make it compatible with php 7?
Switch to preg_replace
Docs and update the expression to use preg syntax (PCRE) instead of ereg syntax (POSIX) where there are differencesDocs (just as it says to do in the manual for ereg_replace
Docs).
Your above code should be this way:
$jquery_click_hook = preg_replace("[^A-Za-z0-9]", "", strtolower($value['name']));