String Function PHP

<?php //ucfirst - pierwsza litera wielka $foo = 'hello world!'; $foo = ucfirst($foo); // Hello world! //mb_strtolowe - wielkie litery na male $str = "Mary Had A Little Lamb"; $str = mb_strtolower($str); // mary had a little lamb //mb_strtoupper - male litery na wielkie $str = "Mary Had A Little Lamb"; $str = mb_strtolower($str); // MARY HAD A LITTLE LAMB //str_replace - zamienia wszystkie znaki, ktore wystapily w pierwszym parametrze, na znaki w drugim parametrze $str = "Znak +"; $str = str_replace('+','plusa', $str); // Znak plusa ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.