List of String programs with examples

PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following exercise.

  1. Write a PHP script to convert lowercase string to uppercase
  2. Write a PHP script to convert uppercase string to lowercase
  3. Write a PHP script to convert first character uppercase
  4. Write a PHP script to convert first character of all the words uppercase
  5. Write a PHP script split the following string
  6. Write a PHP script to extract the user name from the email ID
  7. Write a PHP script to get the last three characters of a string
  8. Write a PHP script to replace the first ‘the’ of the following string with ‘best’
  9. Write a PHP script to generate simple random password from a given string
  10. Write a PHP script to print the next character of a specific character
  11. Write a PHP script to remove a part of a string from the beginning
  12. Write a PHP script to insert a string at the specified position in a given string
  13. Write a PHP script to remove all leading zeroes from a string
  14. Write a PHP script to remove comma(s) from the following numeric string
  15. Write a PHP script to get the first word of a sentence
  16. Write a PHP script to print letters from ‘a’ to ‘z’
  17. Write a PHP script to select first 6 words from the following string

 

Leave a Comment