document.write( "Question 1183006: Write a PHP program to swap two variables.\r
\n" ); document.write( "\n" ); document.write( "The output should be like:\r
\n" ); document.write( "\n" ); document.write( "The number before swapping is: Number a=15 and b=27
\n" ); document.write( "The number after swapping is: Number a=27 and b=15\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "I used this :
\n" ); document.write( "\n" ); document.write( " $a = 15;
\n" ); document.write( " $b = 27;
\n" ); document.write( "
\n" ); document.write( " echo \"\nThe Number before swapping is:\n\";
\n" ); document.write( " echo \"Number a = \".$a.\" and b = \".$b.\"\n\";
\n" ); document.write( "
\n" ); document.write( " $temp = $a;
\n" ); document.write( " $a = $b;
\n" ); document.write( " $b = $temp;
\n" ); document.write( "
\n" ); document.write( " echo \"\nThe number after swapping is: \n\";
\n" ); document.write( " echo \"Number a = \".$a.\" and b = \".$b.\"\n\";
\n" ); document.write( "?>\r
\n" ); document.write( "\n" ); document.write( "But cannot figure how to get the lines separated comes out as one solid row vs the way I inputted above a row for each statement.\r
\n" ); document.write( "\n" ); document.write( "Thank You
\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #813145 by ikleyn(52781)\"\" \"About 
You can put this solution on YOUR website!
.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "At this forum, we do not help in writing any computer programs.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );