This question already has an answer here:
- a method of selecting random characters from given string 15 answers
i want to Use strlen(), substr(), and rand() to print a random character from my name to the screen.
<html>
<p>
<?php
// Use strlen(), substr(), and rand() to
// print a random character from my name to the screen.
$name = "jordi";
$length = strlen("$name");
$length = rand();
$partial = substr($lengt, 0,5);
print $name. "<br />";
print $length. "<br />";
print $partial. "<br />";
?>
</p>
</html>
the outcomes right now(the numbers are randomly generated ofcourse):
jordi
9286122
92861
can someone help me with this.