Why is flash not reading the right PHP echo variable?

I’m passing a variable back to flash from PHP but flash is always reading the last set variable despite the “if” statement.


$testvar = true;
	if( $testvar ) {
		echo "&reply=true&";
	}else{
		echo "&reply=false&";
	}

in a browser it echo’s “&reply=true&” so flash should trace true, right?

Well in flash it will always trace reply as “false”, even if I comment out the else clause.

this is what I have in flash:


var processVars = new LoadVars();
processVars.sendAndLoad("check.php", processVars, 'POST');

processVars.onLoad = function(ok) {
if(ok){
	trace(this.reply)
	}
}