What is a function in PHP used to convert array to string, other than using JSON?
I know there is a function that directly does like JSON. I just don’t remember.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
serialize()is the function you are looking for. It will return a string representation of its input array or object in a PHP-specific internal format. The string may be converted back to its original form withunserialize().But beware, that not all objects are serializable, or some may be only partially serializable and unable to be completely restored with
unserialize().