Escape quotes in a variable with PHP

后端 未结 7 520
温柔的废话
温柔的废话 2021-01-12 03:16

I use this code to genefate html

echo \"\";

Everything would be OK unles

7条回答
  •  一整个雨季
    2021-01-12 03:44

    first do

    // only for the GUY who didn't read the complete answer :(
    $param=addslashes($param); 
    

    then write code in simple HTML

    
    

    Note: mysql_real_escape_string works when we handle with mysqltry with addslashes

提交回复
热议问题