How to deal with this HTML code echoed with PHP which as both single and double quotes?

前端 未结 6 1355
鱼传尺愫
鱼传尺愫 2021-01-16 15:57

I\'m not sure if this is a cleaner way of writing this, but I think I don\'t have problems here:



        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-16 16:42

    I tend to use double quotes for the echo and single quotes within that

    echo "Hello string test ' ";
    

    or you can use the escape \

    echo "hello string test \" ";
    

    Also in your code you are doing an echo within an echo.

提交回复
热议问题