<td>
<div style="display: none"><?=$pass = $myRs['Pass'];?></div>
<?= if ($pass == 1)
{
print "Ja";
}
else
{
print "Nee";
}
</td>
I'm trying to put the result from an array into a variable (which keeps getting printed for some reason). But now i keep getting unexpected T_IF
<?=
means echo
the string followed by =
in PHP5, so it is throwing you unexpected T_IF
error, so you need to use <?php
or <?
if shorthand is enabled. Also you are missing out a closing tag.
You don't need a = symbol after php open tag and also You forgot to close php close tag. change it to this
<td>
<div style="display: none"><?=$pass = $myRs['Pass'];?></div>
<?php if ($pass == 1)
{
print "Ja";
}
else
{
print "Nee";
}
?>
</td>