bizzr3
bizzr3

Reputation: 1955

HTML special characters

I have the following string :

اگر بخواهید

My question is twofold:

  1. What is the encoding of it?
  2. How i can parse it to normal characters?

Upvotes: 0

Views: 427

Answers (3)

TecBrat
TecBrat

Reputation: 3729

I ran the script below and it looks like Arabic.

<?php
$string='&#1575;&#1711;&#1585; &#1576;&#1582;&#1608;&#1575;&#1607;&#1740;&#1583;';
echo html_entity_decode($string);
?>

Upvotes: 0

Marc
Marc

Reputation: 6771

They are UTF8 Entities, decode it with html_entity_decode.

Showing them in a browser: jsfiddle

Upvotes: 0

deceze
deceze

Reputation: 522577

Those are HTML entities, which can be decoded using html_entity_decode:

echo html_entity_decode($str, ENT_COMPAT, 'UTF-8');

Upvotes: 1

Related Questions