answersLogoWhite

0


Best Answer

That's easy to do!

This script will get the POST data from an HTML form and check if it is a vowel.

$vowels = array('a','e','i','o','u'); // Make variable "vowels" an array with all vowels in it

$_POST['string'] = $string;

if (strlen($string) != 1) { // String is not one character.

echo 'The "character" is not one character!";

} else if (in_array($string, $vowels)) { // Check if string is a vowel based on array

echo $string.' is a vowel!'; // Is a vowel

} else {

echo $string.' is not a vowel.'; // Is not a vowel

}

?>

NOTE: Sorry about horrible looking code, Wiki messed up my indenting.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program that stores vowels in an array When you program is given a character it should indicate whether the character is vowel or not?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What should I look for in a weight lose program?

The program should be safe. If you can not tell whether the program is safe or not, you probably should not try it. The program should be geared toward slow and steady weight loss. If it is not, do not join.


Should corporate boards consider character when hiring someone for the top position?

Of course, character is a key ingredient to whether a leader will be successful or not.


What should the resistance on a kwikthermT105 thermostat be to know if it is good or faulty?

Resistance power of 20 amps indicate whether it is good or faulty.


When creating XML why should you use CDATA blocks?

CDATA means character data. CDATA blocks are used to specify that all character data should be considered character data whether or not it looks like a tag or entity reference.


What should one consider when choosing a drug treatment program?

The first thing a person should consider when choosing a drug treatment program is whether the program is qualified and fully licensed. Then the person should look into the success rates of their treatment, as well as the aftercare treatment services offered.


When describing a character what three things should you consider?

When describing a character, you should consider their physical appearance, personality traits, and motivations. These aspects help to create a well-rounded and believable character that resonates with readers.


What should I consider before attending a jewelry design school?

You should consider whether your interest is in art, design, or jewelry cutting itself. You should also consider whether the program would afford you a stable job in the future after you graduate.


How do you program a keyless remote to a 2007 hummer?

To program a Keyless Remote to an 07 Hummer H2 do the following: Press and hold the drivers side power UNLOCK button. Insert key into the ignition, Turn it ON, OFF. Repeat this step twice. At this point the power door locks should cycle to indicate the vehicle is in program mode, ready to accept programming. Press and hold the LOCK and UNLOCK buttons on the transmitter. The power door locks should cycle to indicate successful programming. Turn the ignition ON to exit program mode.


How do you program keyless remote for 2001 Lincoln ls?

Try this: Cycle the ignition from OFF to RUN eight times within 10 seconds, ending in the run position. The power door locks should cycle to indicate program mode, vehicle is ready to accept remotes. Press any button on the remote, once again the locks will cycle to indicate a successful program. Turn the ignition off to exit the program mode.


How do you program keyless remote for a 2000 Lincoln Navigator?

Try this: Cycle the ignition from OFF to RUN eight times within 10 seconds, ending in the run position. The power door locks should cycle to indicate program mode, vehicle is ready to accept remotes. Press any button on the remote, once again the locks will cycle to indicate a successful program. Turn the ignition off to exit the program mode.


How can students indicate that they are interested in participating in the work-study program?

Students interested in the Federally funded work study program should apply for FAFSA. Depending on the school and rules, this is usually how work-study programs go.


Are ear plugs OSHA approved?

Certain ear plugs can be OSHA certified. If you go to a commercial supplier, the package should indicate whether they are OSHA compliant.