How do I use single quotes inside single quotes?

前端 未结 7 1943
梦谈多话
梦谈多话 2020-12-31 14:10

Can anyone explain how to make this code work?

echo \'
Welcome
\'
7条回答
  •  说谎
    说谎 (楼主)
    2020-12-31 14:36

    You need to concatenate your strings & variables.

    echo '
    Welcome ' . $_SESSION['username'] . '
    ';

提交回复
热议问题