Convert a PHP object to an associative array
Asked 07 September, 2021
Viewed 2.5K times
  • 64
Votes

I'm integrating an API to my website which works with data stored in objects while my code is written using arrays.

I'd like a quick-and-dirty function to convert an object to an array.

30 Answer