Math Functions II - DONE!


// Use rand() to print a random number to the screen
print rand();

// 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);




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