I have various text input fields on a homework webpage. I always make them a bit longer than the missing word or phrase.
Sometimes students will enter a space first, then begin writing. So I thought I might need to use trim() to get rid of the whitespace.
I entered all the answers for this week, but I put spaces before the word or phrase.
When I echo them, they all seem OK, no whitespace.
for ($i=1; $i <= 28; $i++) {
echo ${"q$i"} . '<br>';
}
Does PHP automatically trim whitespace when it receives a $_POST variable?