How to Change a Lowercase I to Uppercase in PHP
PHP is a server-side scripting language that you can use to include interactivity in your Web pages. It includes built-in functions for performing simple to complex modifications on your server files, including string transformations. There may be times when you need to modify string data. Change a lowercase "I" to and uppercase "I" using the PHP "str_replace" function.
Instructions
-
-
1
Open your file processing PHP script. Scroll to the area that parses your file data.
-
2
Type the "str_replace" code and include the current string, desired string, and string to modify in the parameters:
$mystring = "The data that i want to change";
str_replace("i", "I", $mystring);
The resulting string is "The data that I want to change."
-
-
3
Save your PHP file, and transfer it to your server.
-
1
References
- Photo Credit Jupiterimages/Photos.com/Getty Images