"make text between asterisks bold" Answer’s


A simple regex will do the trick:

$thenewtext = preg_replace('#*{2}(.*?)*{2}#', '<b>$1</b>', '**Hello World** of PHP');
Wednesday, March 31, 2021
answered 10 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :