> trim() in php ~ Online tutorial

trim() in php

trim() function remove the whitespaces and other predefined character from tht both side of a string

Syntax
trim(character)
Example

<?php
$str=" hello india";
echo "without trim".$str;
// remove whitespaces from the both the string
echo "with trim".trim($str);

?>

Output
without trom: hello india
with trim:hello india

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: