Breaking

Post Top Ad

Your Ad Spot

Activity # 18

PHP ACTIVITY

 

PHP ACTIVITY

Write a PHP program to swap two variables.

 


<!DOCTYPE html>

<html>

<head>

<title>PHP Activity</title>

</head>

<body>

<h2>Activity 3</h2>

<?php

$a= 'A0';

for($b = 1; $b<6; $b++){

echo '<br>'.$a.$b.'<br>';

}

?>

</body>

</html>

 

 

Write a e PHP script to display string, values within a table.

 

 

 

<!DOCTYPE html>

<html>

<head>

<title>PHP Activity</title>

<style type="text/css">

table,td,th{

border: 1px solid black;

border-collapse: collapse;

}

.abc{

color: blue;

}

</style>

</head>

<body>

<h2>Activity 2</h2>

<?php

$a = 1000;

$b = 1200;

$c = 1400;

?>

<table>

<tr>

<td class="abc">Salary of Mr. A is</td>

<td><?php echo $a.'$'; ?></td>

</tr>

<tr>

<td class="abc">Salary of Mr. B is</td>

<td><?php echo $b.'$'; ?></td>

</tr>

<tr>

<td class="abc">Salary of Mr. C is</td>

<td><?php echo $c.'$'; ?></td>

</tr>

</table>

</body>

</html>

 

 

Arithmetic operations on character variables : $d = 'A00'. Using this variable print the following numbers

 

 

 

 

<!DOCTYPE html>

<html>

<head>

<title>PHP Activity</title>

</head>

<body>

<h2>Activity 3</h2>

<?php

$a= 'A0';

for($b = 1; $b<6; $b++){

echo '<br>'.$a.$b.'<br>';

}

?>

</body>

</html>

  

 

 

No comments:

Post a Comment

  How to Submit the Practical Exam on Portal EdTechWorx  

Post Top Ad

Your Ad Spot

Pages