<?php function replace_text($text) { return preg_replace('/`([^`]*)`/', '<code>$1</code>', $text); } $text = 'some words and `some code` and some more words'; echo replace_text($text);
You have javascript disabled. You will not be able to edit any code.