V
V
Vasya Surname2017-07-13 13:15:00
PHP
Vasya Surname, 2017-07-13 13:15:00

How to recode so that in the source code the text is not supposedly such letters & # 1 0 5 6;?

In the source code, the text looks like it was typed with special characters, how can I recode it into a normal form?

<?php
$i = '&#1056;&#1086;&#1084;&#1072;&#1085;';

echo    htmlspecialchars_decode($i);

htmlspecialchars_decode not working

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
egor_nullptr, 2017-07-13
@bazilio2010

echo mb_convert_encoding($i, 'UTF-8', 'HTML-ENTITIES');

B
Boris Korobkov, 2017-07-13
@BorisKorobkov

php.net/manual/en/function.html-entity-decode.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question