If I remember correctly your function cotw_sotw_print_nom() calls "echo($id)" at the end, when I think what you want is to use return $id;
The reason it comes out at the top is because the vbulletin code works by gathering up all the output in a big string, which is then echoed at the end of the script. So if anything you do before that causes output (like calling echo() ), then it comes out before any other output (and so is at the top of the page).
|