[Solved] How to show plus and minus sign when subtracting two variables: [closed] October 22, 2022 by Kirat Instead of echo, try this: printf('%+d', $gd); Reference: printf() string formatting 2 solved How to show plus and minus sign when subtracting two variables: [closed]