Quick question to easily cut a string. I know the substr but I can not use it in my case.
I have for example this thong: "1 rue Maryse Bastie 69500 BRON" I'd like to say "Get all the end before the numbers" in this case "BRON" and get the numbers. I want the city and the postalcode in difference variable.
The API I'm using returns the complete address but I'd like to cut out to save the city and postal code in a different table.
I think this subject can help me : Extracting a zip code from an address string but not to get the city.
For exemple, if i have 1 rue Maryse Bastie 69500 BRON
I want $city = "BRON" and $pc = "69500"
If i have 13 rue Hohwald 67000 Strasbourg
I want $city = "Strasbourg" and $pc = "67000"
Thanks