can this be done

July 1, 2014 at 12:34:01
Specs: Windows 7
I want to add a variables ($user) into this line of html. Original code reads: <li data-thumbnail-path="office/john/sunset.jpg"</li> I need it to be <li data-thumbnail-path="office/$user/sunset.jpg"</li>. Believe me I have tried every combination going. The original variable $user is set in php. I have tried java,php,html but no luck. Thanks for help in advance

See More: can this be done

October 29, 2014 at 11:42:50
What is the output you are getting? I think you are missing an end closing bracket on the opening <li tag

<li data-thumbnail-path="yourstuff"</li> should be:
<li data-thumbnail-path="yourstuff"></li>

Maybe that helps?

Also it would help to have the whole script. I see you are trying to output a PHP variable but I don't see php open and close tags.

If there are none, try this instead:
<li data-thumbnail-path="office/<?php echo $user;?>/sunset.jpg"></li>

Report •
Related Solutions

Ask Question