I have the following code, which is a plain HTML text with some PHP variables. Some of these variables include conditionals, and therefore
The <?= $name; ?> reaches a maxiumun speed of <?= speed; ?> km/h
<?php if( $turbo ) { ?>
, <?= $speed + $turbo; ?> if it has a turbo
<?php } ?>.
This outputs the following:
The viper reaches a maximum speed of 320 km/h , 360 if it has a turbo .
(quick note, the numbers are totally made up).
My problem is with the extra space between "km/h" and the comma, and between "turbo" and the final colon.
If I put everything in a single line the issue is fixed, but I have other sections of the text with much more complex conditions, and putting them all in one line would make the code unreadable. Is there any other way I can get rid of those spaces?