You cannot put a variable for a parameter for the function rand().
This is my code, that had passed:
// Use rand() to print a random number to the screen
// Use your knowledge of strlen(), substr(), and rand() to
// print a random character from your name to the screen.
$name = "Devon";
$subname = substr($name, 0, 3);
$namelen = strlen($subname);
$randomized = rand(1,3);
case 1: echo "D";
case 2: echo "e";
case 3: echo "v";
There's probably an easier way to achieve the same results, but this is my solution.