Convert an object to an associative array in PHP
Sometimes working with PHP we need to convert objects into arrays for implement array functions or reduce looping from our code. Here, we will see two methods to convert objects into associative arrays. Before starting let’s understand what is an object in PHP. An object is an instance of a class that has specific memory