how to include css in php as well\

+1 Hassan Harya · September 12, 2015
plz tell me how can we include css file into php?

Post a Reply

Replies

Oldest  Newest  Rating
+1 nmelssx nmelssx · September 23, 2015
Or, a much easier way would be just using the include function to include other files. Example:

<?php

include("fileName.css");

?>
+1 Alan Johnson · September 13, 2015
The same way you always do, you don't need php for this.

<link href="css/yourcssfile.css" rel="stylesheet">


You'll need to change the href to match the path to your css file...
0 Casper Hollemans · September 16, 2015
if you code in PHP you can close the php code with the PHP closing tag "?>" and go on writing HTML 
or write HTML before the php

Ex.


<?php



?>
<html>
<?php

?>
<head>
      <link href="cssfile" rel="stylesheet">
</head>

</html>

<?php

?>



as you can see you can make a total mess of your file and it works tho
-Greets
0 Neeraj Sharma · September 24, 2015
:)
  • 1

PHP

107,300 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators