mercredi 8 mai 2019

How to convert a certain type of string into an array with keys in php?

I have a string of this type: string(11) "2=OK, 3=OK" from a text file. But I would like to convert it into an array of keys this type : array ( [2] => Ok [3] => Ok ) .

I was wondering how we could do that in PHP.




Aucun commentaire:

Enregistrer un commentaire