I am trying to make a calculator.
How can I make that after the final iteration of the foreach loop the plus
symbol in the echo
command disappears?
Now it's being displayed as
55 + 22 + 4 + = RESULT
$numbers = array (55, 22 , 4);
foreach ($numbers as $number) {
echo "$number + ";