I had some PHP scripts written for my website some years ago that now contain deprecated code and I’m longer getting a response from the developer. I’m wondering if anyone here can help? Complete function that contains deprecated “create_function”:
function codeFileToArray() {
$codes = file(CODESEARCH_CONFIG_CODEFILE,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
array_walk($codes,create_function('&$val', '$val = trim($val);'));
return $codes;
}
Searching the net I see I need to use function() instead of create_function(), but as I’m not familiar with PHP syntax, I’m not sure how to modify this line.
Thanks in advance.