Answers for "how to swap between two variable php"

PHP
5

php switch 2 variables

switch ([$color, $size]) {
    case ['blue', 'small']:
        echo 'blue and small';
    break;

    case ['red', 'large'];
        echo 'red and large';
    break;
}
Posted by: Guest on November-16-2020
-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 between two variable php"

Browse Popular Code Answers by Language