The utf8_encode() function is an inbuilt function in PHP which is used to encode an ISO-8859-1 string to UTF-8. Unicode has been developed to describe all possible characters of all languages and includes a lot of symbols with one unique number for each symbol/character. UTF-8 has been used to transfer the Unicode character from one computer to another. It is not always possible to transfer a Unicode character to another computer reliably.
string utf8_encode( string $string )
Parameters: This function accepts single parameter $string which is required. It specifies the ISO-8859-1 string which need to be encoded.
Return Value: This function returns a string representing the encoded string on success or False on failure.
Note: This function is available for PHP 4.0.0 and newer version.
! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7
- How to get the function name inside a function in PHP ?
- PHP | min( ) Function
- CSS | url() Function
- PHP | dir() Function
- PHP | max( ) Function
- PHP | pow( ) Function
- p5.js | pan() Function
- D3.js | d3.min() function
- PHP | Ds\Map xor() Function
- PHP | Ds\Map put() Function
- PHP | pi( ) Function
- CSS | rgb() Function
- D3.js | d3.hsl() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.