Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
PHP
« Previous
Next »
Which function is used to strip whitespace (or other characters) from the beginning and end of a string?
Options
- trim_str
- strip_str
- strip
- trim
CORRECT ANSWER : trim
Discussion Board
Strip Whitespace
Answer : trim.
trim function is ussed to remove strip whitespace (or other character) from beginning and end of the string. trim function remove the whitespace which is before and after the value.
IamJay 02-10-2015 01:18 AM
To Vivek
$firstString = "The quick brown fox";
$secondString = " jumped over the ";
$thirdString = "lazy dog.";
echo $fourthString = $firstString . trim($secondString);
//here trim function remove the whitespace which is before and after the value of $secondSting variable.
output: The quick brown foxjumped over thelazy dog.
S.M.ZUBAIR 10-10-2014 03:58 PM
explan
sir pls give ans with explanation
vivek 07-27-2014 06:32 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
PHP (39)
DHTML (10)
CSS (21)
MySQL (20)
VLSI (9)
XML (28)
UML (11)
HTML (19)
Fedora (61)
HTML5 (60)
Android (100)
Advertisement
▲