I need to remove portions of a String, some examples of Strings:
$string1 = 'Castanho / Brown';
$string2 = 'Cor de Rosa / Pink';
I need to remove the content of the string after the “/”, like this:
$newString1 = 'Castanho';
$newString2 = 'Cor de Rosa';
How can I in PHP do this. Some clues needed.
Best Regards,
If you want something that’s unreadable you could do:
It would be sad if there wasn’t a slash in the string though.