Stillfinder
4 months ago

str_replace || ! str_replace ?

Posted 4 months ago by Stillfinder

Hi, is it ok to use this? Or maybe there is a better solution?

$parameters['body'] = str_replace('<pre>', '<pre><code>', $parameters['body']);
$parameters['body'] = str_replace('</pre>', '</pre></code>', $parameters['body']);

Please sign in or create an account to participate in this conversation.