could do this with require_once()
. hope it helps.
meta.php
<?php
$meta = "<meta charset=\"utf-8\">";
?>
index.php
<?php require_once('meta.php'); ?>
<!doctype html>
<html>
<head>
<?php echo $meta; ?>
</head>
<body>
</body>
</html>