OK I have a variable that often has a colon ":" in the value.
Example: $state_city = "North Carolina : Durham"
If I want to name another variable $city and only want to get the characters after ":", how do I do that?
Result would be $city = "Durham"
Also want to do some kind of check as well for the presence of the : and there is also the possibility of more than one colon, and all I want is the characters after the last colon. Example if it said with 2 colons
$city_state= "USA:North Caolina

urham"
I still want to it to be $city = "Durham"
If it is does not have a colon, I would like for it to just to take the entire text....
$state_city = "Durham"
and give reult as
$city = "Durham"
I know there must be a combination of an "if else" loop and a certain way to grab only the characters to the right of the last colon, but my newbie php skills are not up to task yet. Any help from a master of the craft would be great appreciated! Thanks!