I am trying to get user input from the command line, but everytime I run this no matter what I enter I get "hi" returned. I don't know why this isn't working, and was hoping someone could take a quick look at it. Thank you:
function getUserInput(){
fwrite(STDOUT, "Enter your choice\n");
$selected = fgets(STDIN);
if ($selected = "josh"){
echo "hi";
}
else{
break;
}
}