Can somebody help me with php? I have a css file and I would like to use those styles in the php code...is that possible?
When you output web pages with PHP, you basically print the HTML to the web port. I see no reason why including CSS as yet more output would be a problem. A little research shows people doing a lot with it: http://stackoverflow.com/questions/13201451/how-to-use-css-style-in-php https://css-tricks.com/css-variables-with-php/ http://code.tutsplus.com/articles/supercharge-your-css-with-php-under-the-hood--net-6409
Wow that css embedded in a php page, and referenced by the html page with a <link rel="stylesheet" href="page.php" media="screen"> is really cool Nice examples
But ya.. looks pretty easy to put css in the file.. either using echo "//css" or simply ending the php tag ?>, then putting your html/css like you normally would - then you can place more php tags as you need them.. I think
Yep. The issue is escaping things to have the right number of \ in there, and things like that, which is the sae issue with PHP to HTML.
Thankyou, I got it. I'm working on a project and wasn't looking at all the files...it really was rather silly...I failed to look at the php file that contained the functions that defined what was going to be output to the html file.
Join our real-time social learning platform and learn together with your friends!