<?php
// Function to swap two numbers
function swapNumbers(&$num1, &$num2) {
    // Swapping logic
    $temp = $num1;
    $num1 = $num2;
    $num2 = $temp;
}

// Example usage
$num1 = 5;
$num2 = 10;

echo "Before swapping: num1 = $num1, num2 = $num2\n";

// Call the function to swap the numbers
swapNumbers($num1, $num2);

echo "After swapping: num1 = $num1, num2 = $num2\n";
?>

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: