PHP trouble, Im not sure how to work this. Thanks for your time I made this form
ID: 3760843 • Letter: P
Question
PHP trouble, Im not sure how to work this. Thanks for your time
I made this form to create an application in PHP that takes a sentence, converts the sentence to all uppercase characters, replaces all vowels with asterisks and displays the end result
Look at this form for information. Feel free to modify this form if you believe you need to.
<form id="frm_q4" name="frm_q4" method="get" action="question4.php">
Enter a sentence:
<input name="sentence" type="text" id="sentence" size="50" />
<br />
<br />
<input type="submit" name="button" id="button" value="Submit" />
Explanation / Answer
change in html code is add
</html>
<?php>
echo strtoupper("$strn");
$len=strlen($str);
$vowels = array('a','e','i','o','u');
for($i=0; $i<$len; $i++){
if(in_array($str[$i], $vowels))
{
$str[$i]='*';
}
}
echo $str;
?>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.