Languages

Fsharp
ActionScript
xBase
Clean
GPSS
PureBasic
Sieve
Erlang
JOVIAL
Mercury
Linda
DataFlex
PostScript
FoxPro2
VFP
Cobol
Prolog
Jython
Awk
VisualBasic
JavaScript
Matlab
ASP
Haskell
Csharp
D
Smalltalk
Nemerle
Pixilang
Java
SQL
Python
ObjectPascal
Ruby
Perl
Pascal
Assembler
PHP
C
Functions  Add function  Users  Registration  Enter   About  ASCII Table  Our helpers

get_html_translation_table in PHP

(PHP 4, PHP 5)

get_html_translation_table — Returns the translation table used by htmlspecialchars() and htmlentities()
Description
array get_html_translation_table ( [int $table [, int $quote_style]] )

get_html_translation_table() will return the translation table that is used internally for htmlspecialchars() and htmlentities().

There are two new constants (HTML_ENTITIES, HTML_SPECIALCHARS) that allow you to specify the table you want. Default value for table is HTML_SPECIALCHARS. And as in the htmlspecialchars() and htmlentities() functions you can optionally specify the quote_style you are working with. The default is ENT_COMPAT mode. See the description of these modes in htmlspecialchars().

Note: Special characters can be encoded in several ways. E.g. " can be encoded as ", " or &#x22. get_html_translation_table() returns only the most common form for them.


<?php
$trans = get_html_translation_table(HTML_ENTITIES);
$str = "Hallo & <Frau> & Kr&#228;mer";
$encoded = strtr($str, $trans);
?>

The $encoded variable will now contain: "Hallo &amp; &lt;Frau&gt; &amp; Kr&auml;mer"
Doing for this function is string
Add by Pancho
You can edit it here
Adding comments is available only for registered users.

Frog Killer Caught in the Act

Photo of a Panamanian golden frog.

A killer has been caught in the act: the first before-and-after view of an infectious disease that led to an amphibian die-off has been released by the scientists who tracked it.

The results are published this week in the journal Proceedings of the National Academy of Sciences (PNAS).

Like a wave, incidence of the fungal disease that wipes out Central American frogs--chytridiomycosis--advances through the region's highlands at a rate of about 30 kilometers ...

More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117348&WT.mc_id=USNSF_51&WT.mc_ev=click


This is an NSF News item.

PycckaR
BepcuR


Articles
Articles


Library
Library


Downloads
Downloads

Google Chrome Golf 6
 © Internet, books, teachers and Rudevich Alexander brains.