I have a webpage called search.php
I want it to have a title/tab tag that looks like this:
<title><?php echo $number_count; ?> items found - Mysearch </title>
<p> <?php echo $number_count; echo "items found" ?> </p>
It must be defined first.
Best (and only in this case) approach to do it is to do calculations first, then generate website output.
You can do it like that:
<?php $count = 125; ?><!DOCTYPE html> .... <title>Title count: <?php echo $count ?></title> ....