- strpos: documentation ( source)
- print_r: documentation ( source)
- explode: documentation ( source)
- array_filter: documentation ( source)
<?php
$text="one #two three #four #five";
$parts = array_filter(
explode(' ', $text),
function($word) {return strpos($word,"#")===0;}
);
print_r($parts);