I successfully managed to run my first php script in a web page!! I'm using a Raspberry Pi and with this script, a result is shown in a php page. It shows METAR data from the local airport.
Basically meteo data. I managed to center the output on the page using the string
> echo "<center>";
It looks nice, but would be nicer if it can be displayed with its original left justification in a centered html table.
Is this possible?
!DOCTYPE html>
<div align="center">
<hr />
<h1>METAR report</h1>
<?php
$output = shell_exec('sh /var/www/html/weather.sh');
echo "<pre>$output</pre>";
?>
$outputcontains. Please read How to create a Minimal, Reproducible Example and edit your question accordingly.align: left. Example:<div style="align: left"><?php ... ?></div>.