# Exploding by multiple delimiters

**URL:** <https://forum.kirupa.com/t/exploding-by-multiple-delimiters/307560>\
**Category:** programming\
**Created:** [April 6, 2010, 2:08am UTC](https://forum.kirupa.com/t/exploding-by-multiple-delimiters/307560 "2010-04-06T02:08:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillyR](https://avatars.discourse-cdn.com/v4/letter/w/71c47a/32.png) [@WillyR](https://forum.kirupa.com/u/WillyR)\
**Post date:** [April 6, 2010, 2:08am UTC](https://forum.kirupa.com/t/exploding-by-multiple-delimiters/307560/1 "2010-04-06T02:08:28Z")

</div>

```php
$results = array('OK', 'TERMSTEXT', 'SERVICE', 'ERROR'); //the headers the api will return
$text = 'OK: id TERMSTEXT: string.... with stuff like bla: :: info hehe, this api sucks SERVICE: info'; //example return by the api

```

I need to split each item into it’s keyed counter part. Hopefully a fresh pair of eyes will be able to help me on this one.
