$array = array('hey', 'what', 'is', 'up'); //convert to string $array = function($array); echo $array; // equals something non-human readable // ex asdklj92vlkan1kljdfvj2 $array = reverse($array); print_r($array); // returns 'hey', 'what', 'is', 'up'
Convert array to string
- FrederickGeek8
- Posts: 148
- Joined: Wed Nov 30, 2011 10:31 pm
Convert array to string
Is there some way to convert an array to something that is transmitable and reverable? So it could be like
Re: Convert array to string
Wouldn't that just be encrypting?
I guess there are plenty of functions for that, and millions of ways to do it.
I guess there are plenty of functions for that, and millions of ways to do it.
- FrederickGeek8
- Posts: 148
- Joined: Wed Nov 30, 2011 10:31 pm
Re: Convert array to string
It doesn't need to be secure or anything. What I ended up doing is
base64_encode(serialize($array))