2 Replies - 258 Views - Last Post: 12 September 2013 - 07:46 PM Rate Topic: -----

#1 insik  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 68
  • Joined: 31-January 12

Putting function inside quotes

Posted 11 September 2013 - 12:37 AM

Hi everyone. just wanna ask if it is possible to put a js function inside quotes.
example:
$result_final .= "
<table width='50%' border=1 cellpadding='9' cellspacing='5' style='position:absolute;top:5%;right:8%;'>
<tr><td>PRG-00$row[5]</td></tr>
<tr><td>$row[2]</td></tr>
<tr><td>$ ".number_format($row[3])."</td></tr>
<tr><td><input type='image' src='images/cartbutton.png' value='Add to Cart'onclick='".addtocart($row[0])."' /></td></tr>
</table>";       



if not. what are other ways?
thanks in advance.

Is This A Good Question/Topic? 0
  • +

Replies To: Putting function inside quotes

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9387
  • View blog
  • Posts: 35,242
  • Joined: 12-June 08

Re: Putting function inside quotes

Posted 11 September 2013 - 06:50 AM

You can try appending quotes to the string of that function's return.
Was This Post Helpful? 0
  • +
  • -

#3 insik  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 68
  • Joined: 31-January 12

Re: Putting function inside quotes

Posted 12 September 2013 - 07:46 PM

thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1