ascii_to_entities()

ascii_to_entities($str)

Parameters:
  • $str (string) – Input string
Returns:

A string with ASCII values converted to entities

Return type:

string

Converts ASCII values to character entities, including high ASCII and MS Word characters that can cause problems when used in a web page, so that they can be shown consistently regardless of browser settings or stored reliably in a database. There is some dependence on your server’s supported character sets, so it may not be 100% reliable in all cases, but for the most part it should correctly identify characters outside the normal range (like accented characters).

Example:

$string = ascii_to_entities($string);
doc_CodeIgniter
2016-10-15 16:30:52
Comments
Leave a Comment

Please login to continue.