I want to remove words that end with : within a string.
For example if I write "test: 1234" it will remove "test:" and only echo " 1234"
Can anyone help me with this?
Thanks in advance
Moderator: General Moderators
Code: Select all
$string = preg_replace('/[^ ]*?:/i', '', $string);