html_entity_decodeの読み方

html_entity_decodeの読み方

phpで利用されるメソッドの1つである「html_entity_decode」の読み方を掲載してます。

読み⽅

エイチティーエムエル・エンティティ・デコード」と読みます。

英訳

「entity」は「実体」という意味があります。

html_entity_decodeとは

phpで、HTML エンティティに対応している文字に変換するメソッドとなります。

<?php

$str = "&lt;a href=&quot;https://sebee.site/&quot;&gt;link&lt;/a&gt;";

$result = htmlspecialchars_decode($str);

print_r($result);

実行結果

<a href="https://sebee.site/">link</a>