Given this string: "hal today is a beatiful weather hal whats going on hal super"
I want to get everything after the last char sequence of "hal". In this case: "super"
This little line already cuts off everything after the first "hal"
:
$whatIWant = substr($string, strpos($string, "hal ") + 4);
However I have no clue how to achieve it that, it just takes the last "hal "
.