Ah thanks, works a treat. On a similar note, furthering this issue, could you explain the following to me?
I get this message while using preg_match:
Code:
PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unmatched parentheses at offset 20
I do not understand it; the code examples used are:
Code:
if (preg_match("/\b{$console['chat']}\b/", 'BOT call'))
The above may not be the source of that error but I know for certain that if $console['chat'] was a value of "..." (without quotes), it matches as true? How "..." translates as "BOT call" is beyond me there.
Code:
if (preg_match("/{$ctag}/", $player['name']))
This one always returns true when $ctag = "|SOG|" (without quotes) and the $player['name'] variable contains anything eg. "Matt" or "Tom"... dont understand what is wrong there.
Code:
if (preg_match("/\b{$disresult['names']}\b/", $player['name']))
Lastly not sure if this one is causing the php error but although it appears to work, maybe I am using the wrong context? This example is used within a while mysql_fetch_array query for the variable $disresult['names'].
Is it best I used strpos() instead?