How to remove the new line character from the end of a text line?



How to remove the new line character from the end of a text line?..

Answer / Shubham Singh

In PHP, you can remove the new line character at the end of a text line using the rtrim() function. Here's an example: `$text = rtrim($text, "n");`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is meant by an associative array?

1 Answers  


How to call a php function from another php file?

1 Answers  


Here in this site i could not find the details for php ZEND certifications or i think u did not post any ? so i need the information about the php certification how to prepare and some of the mock exams?

1 Answers  


What does csrf token mismatch mean?

1 Answers  


What is the main difference between require() and include()?

1 Answers  


Should I use mysqli or pdo?

1 Answers  


What is difference between get and post in php?

1 Answers  


What is a php certification?

1 Answers  


Where is session value stored php?

1 Answers  


How to find a substring from a given string in php?

1 Answers  


how to use particular city location in php?

1 Answers   TCS,


Is time a dependent variable?

1 Answers  


Categories