If you are doing a crude benchmark test I don’t know why it would need to be at the top, And I don’t know what parts you are wanting to do with PHP and what parts with JavaScript.
Got any example code with only enough to show the idea or an outline of the logic flow?
I need it at the top else it would be buried by a potentially long table of results. Plus, I suddenly realized the solution to this tangent problem didn’t pop in to my head and it couldn’t get it to google.
I just needed some direction, but I kept working the problem.
I suddenly remembered to put the script at the bottom of page. Viola! My problem was mostly solved.
this took care of the rest of it:
I tried to put my script here several times, but it wouldn't display.
Just having a forum to think out loud is a huge asset.
if you stick to the IPO Model then all your PHP processing is done before the first line of your HTML. so the results are available to be put at any place.
The composer currently uses a combination of Markdown, bbCode, and HTML.
Don’t feel alone, many have problems with it. (especially when it wants to strip out tags)
Two ways I know of
Select the code block and click the </> icon in the toolbar (indents block 4 spaces each line)
this took care of the rest of it:
<script type="text/javascript">
var runtime2 = <?php echo $runtime; ?>;
document.getElementById("p1").innerHTML = runtime2;
</code>
Or put 3 backticks ```on their own line before and after the code block
this took care of the rest of it:
<script type="text/javascript">
var runtime2 = <?php echo $runtime; ?>;
document.getElementById("p1").innerHTML = runtime2;
</code>
EDIT
Ah, It looks like you figured it out on your own
* for inline <tags> a single backtick before and after will work