Im trying to get an array of words in a string using preg_match..WORD1
and WORD2
are variables which can change.
$content= 'class="gametitle WORD1">< ggg class="userid">WORD2 </ gg>';
i want to get WORD1
and WORD2
right now Im only able to get word 1
$prematch=preg_match('/.class="gametitle.(.*)".*/isU', $content, $matches);
echo $matches[1];
thx in advance!