I have a PHP file with a line that produces a warning in the NetBeans. How can I force the IDE to ignore that concrete warning? Notice that I don\'t want to disable
You can control the hints/warnings that NetBeans provides through Tools > Options > Editor > Hints. You can turn off this specific hint by choosing Language: PHP and unselecting the "Possible accidental assignment, assignments in conditions should be avoided" checkbox.
You should however heed the advise of the other answers and reconsider this style.