I'm calling my remote API and getting this reply:
Array
(
[TEST] => 1.1.1|Running
[MODEL] => 4.91|Running
[ENGING] => 2.4.37|Running
)
I want to Parse it and change it to:
Array
(
[TEST] => [
'version' => "1.1.1",
'status' => 'Running'
]
[MODEL] => [
'version' => "4.91",
'status' => 'Running'
]
[ENGING] => [
'version' => "2.4",
'status' => 'Stop'
]
)
I tried a lot of ways, and searched a lot on Google but didn't find a solution.
I want to split what's coming after the "|" to get the word after it.
Thanks!