Well, you can use the serialise () function to convert an array to a string.
eg we have an array $arr $arr = Array( "0" => "Dipendra", "1" => "Kshitiz", "2" => "Kushal", "3" => "Nirmal", "4" => "Prabin", "5" => "Prakash", "6" => "Sujit" ); echo serialise($arr); Now if we use serialise() function for this array we can view the following output a:7:{i:0;s:8:"Dipendra";i:1;s:7:"Kshitiz";i:2;s:6:"Kushal";i:3;s:6:"Nirmal";i:4;s:6:"Prabin";i:5;s:7:"Prakash";i:6;s:5:"Sujit";}
Thus, we can use the array as a string.
source share