I have a multidimensional array containing comma-separated strings like this
[
[
"users" => [
'email' => 'test@yahoo.com ,testuser@yahoo.com',
'username' => 'test,testuser',
'description' => 'description1,description2'
]
]
]
I want to access the users
subarray data, explode on delimiters, and create a new associative array of indexed arrays.
Desired result:
$User = array(
'email' => array(
'test@yahoo.com',
'testuser@yahoo.com'
),
'username' => array(
'test',
'testuser'
),
'description' => array(
'description1',
'description2'
)
);