Assignment 1 : C2
Assignment No : 1 - C2
<?php error_reporting(null);?>
<html>
<head>
<title>C2</title>
<style type="text/css">
u{color:blue;}
</style>
</head>
<body>
<fieldset>
<form method="post">
<tr><td>string a <input type="text" name="a" value="<?php echo $a; ?>" />
</tr></td><br><br>
<tr><td>string b <input type="text" name="b" value="<?php echo $b; ?>" />
</tr></td><br><br>
<tr><td>charcter Split <input type="number" value="<?php echo $line; ?>
" name="line" placeholder="Enter number here..."/></tr></td><br><br>
<input type="submit" value="Submit"/><hr/>
</form>
</html>
<?php
echo "<span style='color:red;font-family:comic sans ms;font-weight:bold'>";
extract($_POST);
if($a==$b)
{
echo "a==b -><u> a equal b</u></br>";
}
else
echo "a==b -><u> a is not equal b</u></br>";
if(strcmp($a,$b)==0)
{
echo "Strcmp -><u> a equal b</u></br>";
}
else
echo "Strcmp-><u> a is not equal b</u></br>";
$c=$a.$b;
echo "Append String -><u> $c </u></br>";
$d=substr($a,$line,strlen($c));
echo "String a from postion reverse -> <u>".strrev($d)."</u>";
echo "</span>";
?>
<?php error_reporting(null);?>
<html>
<head>
<title>C2</title>
<style type="text/css">
u{color:blue;}
</style>
</head>
<body>
<fieldset>
<form method="post">
<tr><td>string a <input type="text" name="a" value="<?php echo $a; ?>" />
</tr></td><br><br>
<tr><td>string b <input type="text" name="b" value="<?php echo $b; ?>" />
</tr></td><br><br>
<tr><td>charcter Split <input type="number" value="<?php echo $line; ?>
" name="line" placeholder="Enter number here..."/></tr></td><br><br>
<input type="submit" value="Submit"/><hr/>
</form>
</html>
<?php
echo "<span style='color:red;font-family:comic sans ms;font-weight:bold'>";
extract($_POST);
if($a==$b)
{
echo "a==b -><u> a equal b</u></br>";
}
else
echo "a==b -><u> a is not equal b</u></br>";
if(strcmp($a,$b)==0)
{
echo "Strcmp -><u> a equal b</u></br>";
}
else
echo "Strcmp-><u> a is not equal b</u></br>";
$c=$a.$b;
echo "Append String -><u> $c </u></br>";
$d=substr($a,$line,strlen($c));
echo "String a from postion reverse -> <u>".strrev($d)."</u>";
echo "</span>";
?>
Comments
Post a Comment