0

I want to put my html in a php variable and use this variable in the .html() but it doesn't work as I expect it to..how can I do something like that?

$var="<p>test</p>";

//this works 
$return['script'] = "jQuery('#form_pop_out').html('<p>test</p>');" 

//those don't work
$return['script'] = "jQuery('#form_pop_out').html('$var');" 
$return['script'] = "jQuery('#form_pop_out').html('{$var}');" 
$return['script'] = "jQuery('#form_pop_out').html('".$var."');" 
1
Contributor
1
Reply
3
Views
5 Years
Discussion Span
Last Post by arcticM
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.