private insertTokensInContent ( $content, $tokens ) : mixed | ||
$content | ||
$tokens | finds a string in content that starts and ends with ::: and replaces with variable value | |
return | mixed |
private function insertTokensInContent($content, $tokens)
{
foreach ($tokens as $string => $variable) {
$content = str_replace(':::' . $string . ':::', $variable, $content);
}
return $content;
}