in this case, code working
PHP Code:
$rm_question = trim(preg_replace('/\s+/', ' ', xml_convert($cauhoi)));
in javascript show:
Code:
learntips: '<p>Chọn <strong>đ&aacute;p &aacute;n 2</strong> trong mẹo nh&eacute;.</p>
in this case, code dont work so middle space in the content and end content
PHP Code:
$rm_question = xml_convert($cauhoi)));
Code:
<p>Chọn <strong>đ&aacute;p &aacute;n 2</strong> trong mẹo nh&eacute;.</p>
<p><u><strong>Mẹo h&agrave;nh vi sai bị nghi&ecirc;m cấm, kh&ocirc;ng được khi tham gia giao th&ocirc;ng</strong></u></p>
<ol>
<li>Cố &yacute; l&agrave;m hỏng</li>
<li>Bu&ocirc;ng cả hai tay</li>
<li>Tr&ecirc;n cầu hẹp một l&agrave;n xe</li>
<li>Đi v&agrave;o phần đường d&agrave;nh cho người đi bộ</li>
<li>Chạy qu&aacute; tốc độ tối đa cho ph&eacute;p</li>
<li>Lạng l&aacute;nh đ&aacute;nh v&otilde;ng</li>
<li>Vận chuyển tr&aacute;i ph&eacute;p h&agrave;ng nguy hiểm, h&agrave;ng cấm</li>
<li>Đe dọa, x&uacute;c phạm, x&acirc;m phạm</li>
</ol>
I don't know if function helper
xml_convert will add trim and remove all spaces in the future