This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Functions, Part I Forum

View Course » View Exercise

68 points
D6b22b678504c12e7bcaac627d561a51?s=140&d=retro
Submitted by
Dusk665
about 2 years ago

Why wont it accept my code

*So I need to print a random letter from my name. It shows the output as a random letter, but I continue to recieve this message:
Oops, try again. The random output you printed from your name should be a letter. Where's my issue?
*


<?php
$name = "Garret Gillespie";
$rand = substr($name, rand(0,16), 1);
print $rand;
?>


0 votes

permalink

Never mind, it didn't want everything I was echoing to make sure my code worked.

68 points
D6b22b678504c12e7bcaac627d561a51?s=140&d=retro
Submitted by
Dusk665
about 2 years ago