- print_r: documentation ( source)
- preg_split: documentation ( source)
<?php
$value = "<p> Lorem ipsum dolor [State] sit amet, consectetur [City] adipisicing [TopJob7] elit, sed do eiusmod [JobType]</p>";
$tagsReplace = preg_split('/(\[[^]]+\])/', $value, -1, PREG_SPLIT_DELIM_CAPTURE);
print_r($tagsReplace);