Jump to content

[SOLVED] echo with quotes


coderb

Recommended Posts

hi all,

 

no doubt a simple question:

 

I'm trying to echo this dynamic button as follows:

 

echo '<input type="Button" value="View Proof" onclick="href=temp/'.$myflnm.'.pdf">';

this renders:

<input type="Button" value="View Proof" onclick="href=temp/filename.pdf">

 

problem is I need to include a set of single quotes around the href value.

 

So, I need this:

<input type="Button" value="View Proof" onclick="href='temp/filename.pdf'">

 

I tried this but fails on syntax error:

echo '<input type="Button" value="View Proof" onclick="href=''temp/'.$myflnm.'.pdf''">';

 

any help appreciated.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/86130-solved-echo-with-quotes/
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.