Jump to content

[SOLVED] Using a double quote in PHP/HTML


dmaru09

Recommended Posts

Alright, I know in PHP when you echo and want to write in HTML you can normally use a ' to replace a ".

 

However I am running into a problem.

 

echo "

<INPUT

    TYPE=SUBMIT VALUE='Submit CR'

    onClick='return confirm('Changing an existing')'

    >

";

 

Does not seem to produce the correct output.  It works as a button, but no conformation comes up.

 

The normal format for this input would be:

 

echo "

<INPUT

    TYPE=SUBMIT VALUE='Submit CR'

    onClick="return confirm('Changing an existing')"

    >

";

 

 

Any ideas how to fix this?

Link to comment
https://forums.phpfreaks.com/topic/163383-solved-using-a-double-quote-in-phphtml/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.