Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP placement problem

Tags:

function

php

I am calling this function halfway down the page:

    <div id="leftArea">
        <?php
        if (isset($id)){
            single($id);
        }
        ?>
    </div>

The problem is i want use some of the output in the meta tags in the <head>, whats the best way to approach this?

EDIT:

The single function, takes the $id and echo's the data straight to the page, exactly where it is. In the DIV leftArea. But i want to take one of the rows from the DB and insert it into the META tags at the top

like image 246
benhowdle89 Avatar asked Apr 01 '26 22:04

benhowdle89


1 Answers

Copy the code into the <head> section.

like image 146
AndreKR Avatar answered Apr 03 '26 12:04

AndreKR