<Head> dans une fonction php ?
Bonjour à tous,
Je voulais savoir, ayant ce code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<head>
<title>PDF template</title>
<meta charset="utf-8">
<style>h1, h2, h3, h4, p, ul {
padding: 0;
margin: 0;
}
ul li {
list-style: none;
}
* {
box-sizing: border-box;
}
table td, table th {
font-weight: normal;
}
dl dd, dl dt {
line-height: 20px;
}</style>
<link rel="stylesheet" href="http://blabla.com/css/cssFilename.css">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="js/l10n.js"></script>
</head> |
Si j'ai le droit de l'écrire comme ceci :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
<?php
$title = 'PDF Template';
$CSS = 'h1, h2, h3, h4, p, ul {
padding: 0;
margin: 0;
}
ul li {
list-style: none;
}
* {
box-sitting: border-box;
}
table td, table th {
font-weight: normal;
}
dl dd, dl dt {
line-height: 20px;
}'
echo '
<head>
<title>'.$title.'</title>
<meta charset="utf-8">
<style>'.$CSS.'</style>
<link rel="stylesheet" href="http://blabla.com/css/cssFilename.css">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="js/l10n.js"></script>
</head>'
?> |
Merci bien,
Cordialement, Skyxia.