json_encode( $my_array );
Note:It should be noted that json_encode() function is only available in PHP 5.2 or after versions.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.