Home >Backend Development >PHP Tutorial >How to convert array encoding in php
The result is blank. With the help of var_export function, the final function is as follows:
Principle analysis: In the var_export function, set the second parameter to true, return the array prototype string, convert the string to utf-8 encoding, and then use eval to perform the return (similar to an anonymous function?). This easily solves the problem of array encoding conversion in php. |