susanBuck / e15-spring22

0 stars 0 forks source link

Help With My vowels Count Function #14

Closed YvaGithub closed 2 years ago

YvaGithub commented 2 years ago

Hello everyone, I got my vowel count function to work but only when I hardcoded a string into it. I am attaching a snippet of code for some suggestions please. Anticipated thanks, Yvaral

snippet snippet2 snippet3

susanBuck commented 2 years ago

Hi @YvaGithub -

I got my vowel count function to work but only when I hardcoded a string into it

How exactly is it failing when you try to pass in the string from the form?

In your code, I see you do this in process.php on line 6:

$vowelCount = NumberofVowels($inputString);

That should work - you just need to output the resulting $vowelCount variable as part of your results in the view file, e.g. something like this:

There are <?php echo $vowelCount; ?> vowel(s) in this word.
YvaGithub commented 2 years ago

Thank you very much it works now.