php - Output image URL from image object as background-image -


i have field group loads image image object, i'm trying output url style background-image parameter. it's outputting url in way style sheet can't pick up.

<? $test_output .= '<div class="complete-image cropped" style="background-image: url("'. $smallimage .'");">'."\n";?> 

i'm returning test_output @ end correctly, problem syntax?

is problem syntax?

not php syntax error html! second double quote after url( end value of style attribute , break markup:

<? $test_output .= '<div class="complete-image cropped" style="background-image: url("'. $smallimage .'");">'."\n";?> <!--                                                                          here --^                            --> 

try using so:

<? $test_output .= "<div class=\"complete-image cropped\" style=\"background-image: url($smallimage);\">\n"; ?> 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -