I'm not even sure this is posible but it would make things easyer for me. Is it posbile to get the string to function in the IF statement? This is just an example.
$username = "MastricX"; $string = "$username = 'MastricX'"; if($string){ echo"yay"; }
You can using [man]eval[/man] although there is a saying that if you need eval to solve your problem, you're asking the wrong questions.
Thanks, usualy wouldn't do it that way but using it would limit the number of querys i have to pull
If you mean that you want to compare the values with "==" rather than assign via "=", then:
$username = "MastricX"; $string = ($username == 'MastricX'); $string will now be boolean true/false if($string){ echo"yay"; }