.
$row['NO'] = '<a href="javascript:void(0)" onClick="openmywindow(\''.$row['bcd'].'\',\''.$row['gfh'].'\',\''.$row['test2'].'\',\''.$_REQUEST['test1'].'\')">'.$row['abc'].'</a>'
In the above statement, what is the meaning of escaping the values in that manner such as ‘\’. How can i learn this?
In the above statement i want to replace the php variable $row['TEST2'] with a static value ‘OPEN’, but i am getting a syntax error.
Because the escaping is very confusing it might be better to use HEREDOC:
More about strings in the manual (including escaping and heredoc).
PS: Do not use
$_REQUEST. Instead use$_GETor$_POST(the one that is appropriate here.)