<?php $info = "this:is|a,test."; $tokens = ":|,"; $tokenized = strtok($info, $tokens); while ($tokenized) { echo "Element = $tokenized<br>"; $tokenized = strtok($tokens); } ?>