Tutorials out there in the net really need to be updated because newcomers are stuck when they get errors in the tutorial it self.
Get Free Sinhala IT Learning Videos Kuppiya.com
<?php
echo sqrt(4); // 2
echo sqrt(12); // 3.4641016151378
echo sqrt(16); // 4
echo sqrt(17); // 4.1231056256177
?>
<?php
echo round(10.8); // 11
echo '<br />';
echo round(10.4); // 10
echo '<br />';
/*you can also set the number of precision,
or in other words number of decimal digits
you like to round the floating number
*/
echo round(10.837, 2); // 10.84
echo '<br />';
echo round(10.435767, 4); // 10.4358
echo '<br />';
?>
<head>
<script type="text/javascript">
var my_string = "Hello My Name Is Kusal";
var split_var = my_string.split(" "); //separate by space
alert(split_var[0]); //Hello
alert(split_var[1]); //My
alert(split_var[4]); //Kusal
</script>
</head>