Assign Javascript popup HTML link to PHP variable -
I am trying to specify the following in PHP variables:
[ Lt; A href = '' 'javascript: pop_booking_item_add ({ID})' '' & gt; add new item & lt; / a & gt;] I have tried to do this :
$ add_button = "[& lt; A href = '' 'javascript: pop_booking_item_add ({id})' '' & gt; Add new item & lt; / A & gt;] "; But I'm getting an error message:
Error: syntax error, unexpected" Javascript: pop_booking_tam_A "(TokenNantNACAACEDI_TRTI) / P>
I think I need to avoid quotes, but I'm not sure how?
This should work:
$ add_button = "[& lt; A href = 'javascript: pop_booking_item_add ({id})' & gt; Add new item & lt; / A & gt;] "; or
$ add_button =" [& lt; A href = \ "javascript: pop_booking_item_add ({id}) \" & gt; Add new item & lt; / A & gt;] ";
Comments
Post a Comment