0
I’m using php.
I have the following text in a variable:
X-Inquiry-Name: analia felices
X-Inquiry-Adults: 5
X-Inquiry-Children: 10
I would like to be transforming into an array, separating these two points, more or less as an example below:
array (
[X-Inquiry-Name] => analia felices
[X-Inquiry-Adults] => 5
[X-Inquiry-Children] => 10
)
I tried to find a function on http://php.net but I couldn’t find anything to do it. Someone remembers some function to do it?
I recommend that you explain the code, should the author need to make any modification in case of another need, I’m sure that will take my comment as a constructive criticism.
– Guilherme Nascimento
Good evening William, Your code has worked, now I have a difficulty, in one of the items this appearing wrong inside him has 2 two points. -
– Diego Marquez
Opa, sorry, my script looks like this: preg_match_all('/(.): (.)/', $emailStructure2, $match);
– Diego Marquez
Thanks for the help, I got it.
– Diego Marquez