I have a file named page.php and it is something like this;
<? include "header.php"; ?>
<body>
...
</body>
<? include "header.php"; ?>
Between the <body> tags, I run a sql query and get a variable called as $title.
I want to show that variable as the html title of my page which is in the header.php .
How can I do this?
I simply tried what i said, but it didn’t work.
Run it before the
<body>tags, save the results to a variable, and process this variable wherever you want (as a title and in the<body>tags).