Right now I have this code.
<?php
error_reporting(E_ALL);
require_once('content_config.php');
function callback($buffer)
{
// replace all the apples with oranges
foreach ($config as $key => $value)
{
$buffer = str_replace($key, $value, $buffer);
}
return $buffer;
}
ob_start("callback");
?>
some content
<?php
ob_end_flush();
?>
in the content_config.php file:
$config['SiteName'] = 'MySiteName';
$config['SiteAuthor'] = 'thatGuy';
What I want to do is that I want to replace the placeholders that with the key of the config array with its value.
Right now, it doesn't work :(