Hello,

I'm looking for some help on the following line of code, it keeps throwing an error.

Parse error: syntax error, unexpected T_FUNCTION Line 168.

The code below is line 168.

$content = preg_replace_callback("/\{include '(.*?)\'}/", function($m) {
  return file_get_contents(CORE . 'includes/' .$m[1]);}, $str);

Any ideas?

Are you using PHP 5.3.0 ? If you are not you need to use create_function instead of the anonymous one.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.