Hello Reader's! If you're having a problem to convert a string into an array then you can use the html entity in php.
Let's see the example below:-
&
then be sure to use html_entity_decode
// Input string //
$input = 'pg_id=2_parent_id=2_document_video';
// Parse //
parse_str(html_entity_decode($input), $out);
Ouput is :-
array(
'pg_id' => 2,
'parent_id' => 2,
'document' => ,
'video' =>
)
0 Comment(s)