Created
September 18, 2018 08:42
-
-
Save palexandrite/1f143ab7aae6ea17c7bd65318f7ca214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$html = $_POST['html']; | |
// Заголовки в верхнем регистре | |
$html = preg_replace_callback( | |
'(<h([1-6])>(.*?)</h\1>)', | |
function ($m) { | |
return "<h$m[1]>" . strtoupper($m[2]) . "</h$m[1]>"; | |
}, | |
$html | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
вввв