Jump to content

Javascrip in PHP help


toolman

Recommended Posts

Hi,

 

I am trying to integrate some javascript into some PHP, but I cannot work out how to escape the quotes.

 

This is what I have without any escapes:

 

' . (
						trim($prod['prodDesc'])!='' ?
							'
<a href="javascript:animatedcollapse.toggle('michael')">Toggle</a>

<div id="michael" style="width: 300px; background: #E7FFCC; display:none">
<b>Content inside DIV!</b><br />
<b>Note: Fade effect enabled. Height programmically defined. DIV hidden using inline CSS.</b><br />
</div>

<h3>{{txt_prod_desc}}</h3>
							' . nl2br($p->getTranslation('desc',$_SESSION['lang'],$prod['prodID'],1)) 

 

Could someone help me work out how to make the javascript work within the PHP?

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/200025-javascrip-in-php-help/
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.