3
I am wanting to take a part of a string, more specifically numbers together with the letter, for example:
$string = "Parte da string - 60h"
Well, I use str_replace as follows:
$string = str_replace(' - ', '', $string);
$string = str_replace('[ˆ0-99]h', '', $string);
The problem is that I get the following string : Part of string60h. It seems to me that the second use of str_replace is not being made. Someone can help me?
PERFECT! Exactly what I wanted.
– Anderson Amorim