Ad block is installed and active. Please support us by disabling it.
HomeSaturday, January 20, 2018, 16:56:14
3

PHP Trim

Tuesday, February 10, 15, 13:39:21, 3 Yaers Ago Via wain, Hits: 3141
trim() Strip whitespace (or other characters) from the beginning and end of a string.
Example:
Code:
<?php
$words = "PHP is an open-source server-side scripting language";
//explode — split a string by string
$cc = explode(' ', $words);
foreach ($cc as $key => $value) {
//trim — strip whitespace from the beginning
//and end of a string
$value = trim($value);
echo " <a href=\"$value\">$value</a> ";
}
?>

Sign In

Sponsor

Related

MySQL Tutorials

MySQL tutorials, MySQL training, learn MySQL, MySQL Tutorial with practical examples.

PHP/MySQL Bookmarklet - PHP Tutorial

PHP/MySQL bookmarklet, bookmark current page, PHP/MySQL tutorial.

Imageline

Draws a line between the two given points.

Addslashes - Stripslashes

addslashes — quote string with slashes, stripslashes — un-quotes a quoted string

How to insert new line (IP Address) with fwrite

How to insert new line (IP Address) with fwrite, Get IP address and write to file.

Sitemap

phpForm.net Website Sitemap

Link Base 2.0.

Manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links.

Show / Hide Div with CSS

CSS Display and Visibility:The visibility property specifies whether or not an element is visible.

PHP Cookies - setcookie

Defines a cookie to be sent along with the rest of the HTTP headers.

ShoutBox 1.1. PHP Script

ShoutBox allows your users to post short messages on your site. The script is lightweight and very easy to install and use.
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Jun 15, 17
So far has created 115 entries.
wain
This author has not yet filled in any details.