<?php
$string = 'Lorem ipsum /dolor sit amet/, consectetur /adipiscing elit/ aaaa /adipiscing elit/.';
function removeParseContentBar($string)
{
$i=0;
foreach ($arr as $k => $char) {
if ($char == '/') {
$arr[$k] = ($i % 2 == 0) ? '<' : '/>';
} else {
$arr[$k] = $char;
$i++;
}
$i++;
}
}
echo removeParseContentBar($string);
PD9waHAKJHN0cmluZyA9ICdMb3JlbSBpcHN1bSAvZG9sb3Igc2l0IGFtZXQvLCBjb25zZWN0ZXR1ciAvYWRpcGlzY2luZyBlbGl0LyBhYWFhIC9hZGlwaXNjaW5nIGVsaXQvLic7CgoKZnVuY3Rpb24gcmVtb3ZlUGFyc2VDb250ZW50QmFyKCRzdHJpbmcpCnsKCSRhcnIgPSBzdHJfc3BsaXQoJHN0cmluZyk7CgkkaT0wOwogICAgZm9yZWFjaCAoJGFyciBhcyAkayA9PiAkY2hhcikgewogICAgICAgIGlmICgkY2hhciA9PSAnLycpIHsKICAgICAgICAgICAkYXJyWyRrXSA9ICgkaSAlIDIgPT0gMCkgPyAnPCcgOiAgJy8+JzsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgJGFyclska10gPSAkY2hhcjsKICAgCSAgICAgICRpKys7CiAgICAgICAgfQogICAgJGkrKzsKICAgIH0gCiAgICAkY29udGVudCA9IGltcGxvZGUoJycsJGFycik7CiAgICByZXR1cm4gc3RyaXBfdGFncygkY29udGVudCk7IAp9CmVjaG8gcmVtb3ZlUGFyc2VDb250ZW50QmFyKCRzdHJpbmcpOw==