search

Home  >  Q&A  >  body text

Single and double quotation mark parsing escape character problem

<?php//What should I do if I want to display a double quote in the string of $beizi? $shengyang = 'i\'m xiaoshengyang';echo $shengyang;?>

Single quotes do not parse escape characters, why does 'i\'m xiaoshengyang' display i'm xiaoshengyang instead of \'m xiaoshengyang

for ctffor ctf965 days ago1214

reply all(1)I'll reply

  • autoload

    autoload2022-05-17 15:46:19

    Who told you that single quotes do not parse transfer characters?

    Single quotes and the escape character itself can be escaped in a string defined by single quotes

    reply
    0
  • Cancelreply