This is the error that appears to me,
An uncaught Exception was encountered Type: ParseError
Message: syntax error, unexpected 'if' (T_IF)
Filename: C: \ xampp \ htdocs \ upa \ application \ controllers \ admin \ Users.php
Line Number: 53
and this is my code:
$action2 = "<td id='delboxbox".$r->id."'><label class='switch'><input type='checkbox'".
if ($r->state==2) {.'checked'.}." ><span class='slider'></span></label></td>";
It may be a minimal error, but I have looked and I have not found it.