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
Post a Comment