How can I check if a string has any value like
(xx%)
at the end?
I would like to extract that value (remove it from the string and save the value in a variable)
Example:
Lorem ipsum (34%)
should become
$string = 'Lorem ipsum';
$value = 34;