PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The code above generates a url to be used as a image for the given product. I want to set that generated url as the background of a css div. How would I be able to include php in css?
save the file as '.php' instead of '.css'.
and instead of linking css file,include the php file.Then you will be able to write the code as Celauran said.
Do
1) if your css file is 'css.css' make it a php file (say css.php)
2) include css.php where you have linked the css.css.
The css.php will look as
======================
<style>
.............
...............
...your codes..
............
#your_div_name {