I am using HTML inside PHP like this.
for($i=0;$i<count($arrSql);$i++)
$opt.="<option". if($_GET['pId'] == $arrSql[$i][0]){ echo "Selected";} ."value=".$arrSql[$i][0].">".$arrSql[$i][1]."</option>";
I have tested it for a long time and it looks correct, but it is showing an error and I don’t know where the bug is.
You can’t use concatenation and
iftogether. Change it to: