1$lowercase = "this is lower case";
2$uppercase = strtoupper($lowercase);
3
4echo $uppercase;
5// THIS IS LOWER CASE
1
2<?php
3echo substr('abcdef', 1); // bcdef
4echo substr('abcdef', 1, 3); // bcd
5echo substr('abcdef', 0, 4); // abcd
6echo substr('abcdef', 0, 8); // abcdef
7echo substr('abcdef', -1, 1); // f
8
9// Accessing single characters in a string
10// can also be achieved using "square brackets"
11$string = 'abcdef';
12echo $string[0]; // a
13echo $string[3]; // d
14echo $string[strlen($string)-1]; // f
15
16?>
17
18//substr() function returns certain bits of a string