Given a multiple line sentence or statement the task is to convert the whole statement in a
single line. See the example below.
Input : Hello welcome to geeksforgeeks. Output : Hello welcome to geeksforgeeks. Remove the new line between Hello and geeksforgeeks. Input : I love geeksforgeeks Output : I love geeksforgeeks
The idea is to use str_replace()
- Remove characters from a numeric string such that string becomes divisible by 8
- How to remove extension from string in PHP?
- How to remove the first character of string in PHP?
- How to remove line breaks from the string in PHP?
- How to remove portion of a string after a certain character in PHP?
- How to remove all non-printable characters in a string in PHP?
- How to remove all leading zeros in a string in PHP ?
- Program to remove consonants from a String
- Form N-copy string with add, remove and append operations
- Remove characters from string that appears strictly less than K times
- GRE Geometry | Lines and Angles
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.