Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $string = 'Some text Here that needs changing';
- // lowercase it all.
- $string = strtolower($string);
- // Explode it by spaces - this gives you an array.
- $array = explode(' ', $string);
- // Then implode it back together using '-' as the seperator.
- $url = implode('-', $array);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement