PHP utf8_encode() Function

Definition and Usage

The utf8_encode() function encodes an ISO-8859-1 string into UTF-8.

Unicode is a global standard that has developed to be able to describe characters in all languages through unique encoding, as well as a large number of symbols.

However, it is not always reliable to pass Unicode characters between computers. UTF-8 can be used to transmit Unicode characters between computers.

If successful, the function will return the encoded string; otherwise, it will return false.

Syntax

utf8_encode(string)
Parameter Description
string Required. Specifies the string to be encoded.