Answers for "how to swap 2 variables without use of a 3rd in php"

PHP
-1

Write a php program to swap two numbers using temporary variable

<?php $a = 5; $b = 10; $temp = $a; $a = $b; $b = $temp; echo "after swapping"; echo "a =".$a." b=".$b; ?>
Posted by: Guest on July-05-2021

Code answers related to "how to swap 2 variables without use of a 3rd in php"

Browse Popular Code Answers by Language