Math Functions II - DONE!


#1



<?php
// Use rand() to print a random number to the screen
print rand();
?>



<?php
// Use your knowledge of strlen(), substr(), and rand() to
// print a random character from your name to the screen.
$name = "Pavlo";
$nameLen = strlen($name);
$rendname = rand(0,$nameLen);
print substr($name,rand(0,$nameLen - 1),1);

?>

</p>


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.