If I want to take a whole sentence, example:
"The Province of Armies of Terror (3:37) as of May 13th, YR8"
How would I make so I get "Armies of Terror" into $name?
The big problem is that the name can be from 1 to about 10 words.
Thanks π
How would you know what is name? Anything after "Province of" and before a parenthesis?
Diego
correct π
use regular expressions:
<? $str = "The Province of Armies of Terror (3:37) as of May 13th, YR8"; preg_match('/Province of (.*) (/i', $str, $matches); print $matches[1]; ?>
Thanks helped alot!
But how the heck should I write in the preg_match if I want to get the info inside of the ( )?
The numbers can ofcoruse be different but always Γ³ne or two digits
Armies of Terror (3:37) as of May...
Thanks.