- 2008 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2007 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2006 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2005 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2004 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2003 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2002 : 01 02 03 04 05 06 07 08 09 10 11 12
2006-08-08
HTMLエンティティから元の文字に戻す
- Summary
文字列中のHTML特殊文字を元に戻す.
htmlspecialchars()の逆の操作.
- Reference
マイクロチップス - PHP Tips
http://www.sound-uz.jp/php/tips/micro.html#c01
文字列中のHTML特殊文字を元に戻す.
htmlspecialchars()の逆の操作.
function unhtmlspecialchars( $str ) { $entry = array_flip( get_html_translation_table( HTML_SPECIALCHARS ) ); return strtr( $str, $entry ); }
function unhtmlentities($string) { // 数値エンティティの置換 $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string); $string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string); // 文字エンティティの置換 $trans_tbl = get_html_translation_table(HTML_ENTITIES); $trans_tbl = array_flip($trans_tbl); return strtr($string, $trans_tbl); }
- Reference
マイクロチップス - PHP Tips
http://www.sound-uz.jp/php/tips/micro.html#c01
- 2008 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2007 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2006 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2005 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2004 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2003 : 01 02 03 04 05 06 07 08 09 10 11 12
- 2002 : 01 02 03 04 05 06 07 08 09 10 11 12
2006-08 /