HomeSunday, June 24, 2018, 01:39:38
3

PHP Trim

Tuesday, February 10, 15, 13:39:21, 3 Yaers Ago Via wain, Hits: 6087
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

PHP Cookies - setcookie

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

Adsense crawler errors and robots.txt

How to fix Google AdSense crawler errors in robots.txt

PHP Form Validation

PHP form validation :: PHP tutorial, requirement(s): PHP Server

How to set up password for phpMyAdmin in Wamp Server

Password for phpMyAdmin in Wamp

PHP Tutorials

Useful step-by-step PHP tutorials for beginners

Sending HTML Email With Images - PHP Tutorial

Sending HTML Email With Images - Upload Image with PHP - Creating Dynamic Webpages Using PHP and MySQL - Select, Delete, Update..

Site Recommendation

This script will allow your visitors to recommend your site to their friends.

Contact Us Form With Captcha

A contact us form with email and form field validation. It allows your visitors to send you an email directly from your website. Features: Captcha Image, HTML output.

Syntax highlighting in Smarty

Syntax highlighting for Smarty - Google Code Prettify

Creating a basic bad word filter in PHP

This tutorial will show you how to create a basic bad word filter in PHP
About Author

wain

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