when I get input from cli, I var_dump it and this showed for me:
string(2) "Y
"
So how I understand I receive the single char and the bag of blank spaces, so this code will return false ($input == "Y")
. How I can solve this issue?
when I get input from cli, I var_dump it and this showed for me:
string(2) "Y
"
So how I understand I receive the single char and the bag of blank spaces, so this code will return false ($input == "Y")
. How I can solve this issue?
Copyright © 2021 Jogjafile Inc.
You can easily remove all this whitespace using
trim()