Tuesday, November 25, 2014

md5 function in php

<?php
$string="123";
echo md5($string);
?>

htmlentities function in php

<!DOCTYPE html>
<html>
<body>

<?php
$str = "<© W3Sçh°°¦§>";
echo htmlentities($str);
?>

<p>Converting characters into entities are often used to prevent browsers from using it as an HTML element. This can be especially useful to prevent code from running when users have access to display input on your homepage.</p>

</body>
</html>

Sunday, November 23, 2014

You can altime live cricket

Saturday, November 8, 2014

How to setting time in php

<?php
//format 12 hours time jone
echo date("h: i:s");
//formate 24 hours jone
echo date("H: i:s");
//increase time form present time
$timeset=strtotime("+50 hours");
echo date("H:i:s",$timeset);
?>

How to upper string from lower

<?php
$string_ano="joynob";
$string_to_upper=strtoupper("$string_ano");
echo $string_to_upper;
?>

How to lower string from upper.

<?php
$string="FARIDUL";
$string_to_upper=strtoupper("$string");
echo $string_to_upper;
?>

How to reverse string in php

<?php
$string="FARIDUL";
$string_rev=strrev("$string");
echo $string_rev;
?>