Show a certain % less/more than an API pulls through

#1

I have a valuation API ( for car valuations) I want to show a certain % less or more than it brings forward.

if (isset($_GET['step']) && $_GET['step'] == 4 && $_SESSION['valuation-step'] == 4) {
    				?>
    					jQuery('#valuation-form').removeClass('step-1').addClass('step-4');
    					jQuery('.your-valuation-amount').text('<?php echo '£'.number_format($_SESSION['valuation-trade-poor']); ?>');
    				<?php
    			}

This is where the value is brought too.

Thanks in advance guys

#2

I’m confused. Are you calling the API with Javascript or PHP? You are cluttering up the code base and that will make it harder to maintain later.