Please take a look at this:
$order = isset( $_GET['o'] ) ? '?o='.$_GET['o'].'&p=' : '?p=';
echo "<a href='$order.1'>1</a> ";
As its obvious in the fiddle, here is the output:
<a href='?p=.1'>1</a>
// ^ this
But as I've commented in the code above, that dot *(which acts as a separator there) should be removed. So this is expected result:
<a href='?p=1'>1</a>
And when I remove it, the variable name will be combined to that number and PHP cannot find expected variable anymore.
Anyway, is there any workaround?