how to convert stdclass to array in php code example
Example 1: php stdclass to array
// The manual specifies the second argument of json_decode as:
// assoc
// When TRUE, returned objects will be converted into associative arrays.
$array = json_decode(json_encode($booking), true);
Example 2: string to array in php
print_r(explode(',',$yourstring));