there any php functions that are used to convert a string into upper case, lower case or title case. For this time I just want to discuss ucwords function. Ucwords function is a function that is used to change the characters of a string to title case form
1: <title>ucwords</title>
2: <center>
3: <form action="ucwords.php" method="get">
4: <table width="222" border="0">
5: <tr>
6: <td width="68">sentence</td>
7: <td width="144"><input type="text" name="sentence" value="<?php echo $_GET[sentence]; ?>" /></td>
8: </tr>
9: <tr>
10: <td colspan="2" align="center"><input type="submit" name="submit" value="process" /></td>
11: </tr>
12: </table>
13: </form>
14: <?php
15: if ($_GET[submit]=="process") {
16: ?>
17: sentence<b><?php echo $_GET[sentence]; ?></b> after using the function becomes ucwords berchange
18: <?php
19: $sentence=ucwords($_GET[sentence]);
20: echo "<b>$sentence</b>";
21: }
22: ?>
23: </center>
if ($_GET[submit]=="process") {
?>sentence<?php echo $_GET[sentence]; ?> after using the function becomes ucwords berchange
0 comments:
Post a Comment
thank you for visiting my blog and comment here. I hope the commentary contains a comment which intend to build and repair. criticism and suggestions I gladly accept.