in your $content variables im assuming you are escaping the double-quotes, even though you explicitly stated what string was in $content (without the escaped quotes, ie \")
for your "Namco" line the expression is not giving the incorrect output, it is actually not even matched at all. notice at the end of the regex there is a "<br>" but this is not present in your "Producer...Namco" line, so the string is never matched. since the if block is not executed in this case (and $platform is not set to $1), $platform must have already had the value of "Namco". to see this, set the value of $platform to something else or empty and when it is printed it will not have changed.
whenever i am debugging any code i will use print statements to ensure something is (or isnt) happening correctly. a simple debug would be to put a "print "matched!";" line in the if block to see when it is being matched or not.
hope it helps
Last edited by nadroj; 09-08-2008 at 08:34 PM.