pickzy.com

C  |  C++  |  Objective-C  |  VC++  |  Win32  |  MFC  |  Java  |  Php  |  Delphi  |  Visual Basic  |  .Net  |  Networking  |  General  |  Games  |  Jobs  |  Javascript  |  




Menu

pickSourcecode.com


        

 




 

Php > Programs

 

Assigning values in PHP

Assigning values in PHP

Sample of assigning values to variables and doing some strange operations.

<?php
function outputme($_x, $_y) {
echo "( $_x, $_y )<br>";
}

$x = 5;
$y = 3;
outputme($x,$y);
$x += 2 * $y;
outputme($x,$y);
$x += ($y *= 2);
outputme($x,$y);

?>


OUTPUT:

( 5, 3 )
( 11, 3 )
( 17, 6 )

 
Privacy Policy | About Us