When clicking link-1 or link-2 a modal will come up (they use the same modal) with link-a and link-b.
When link-a is clicked I need it to be <a herf="/link-1/link-a/">link-a</a>
So when that is clicked the url path will be as below
www.example.co.uk/link-1/link-a/
This is what I have so far;
<?php
$current_url = $_SERVER['REQUEST_URI'];
$add = 'link-1';
$final = $add;
?>
<a href="/<?php echo $final;?>/link-a">link-a</a>
I think you need to do it like this