wilna Posted June 24, 2010 Share Posted June 24, 2010 Hi I've tried to google php & css for over an hour now. I have a file (*.php) with php code in it. I would like to include css. How do I get started? I know in an HTML file you insert css as follows: <link rel="stylesheet" type="text/css" href="mystyle.css" />. How do you do it in php? Help will be apreicated. Quote Link to comment Share on other sites More sharing options...
joel24 Posted June 24, 2010 Share Posted June 24, 2010 PHP is a language which is read and executed by the server's computers and returns HTML to the viewer. So you just tell the PHP to echo the include when you echo the rest of the HTML head i.e. echo '<html> <head> <title>My Web-Page</title> <link rel="stylesheet" type="text/css" href="mystyle.css" /> </head> <body> </body> </html>'; Quote Link to comment Share on other sites More sharing options...
wilna Posted June 24, 2010 Author Share Posted June 24, 2010 Thank you! So easy - you just have to know how! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.