HomeMonday, July 24, 2017, 22:35:23
3

PHP Trim

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

Contact Us PHP Form 1.1.

A contact us form with email and form field validation. It allows your visitors to send you an email directly from your website.

Adodb Recordcount Example

RecordCount returns the number of rows in the record set.

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.

MySQL to RSS

Publishing MySQL data in RSS

Captcha V2 - Free PHP Script

PHP Captcha protection image Version 2, - Requirement(s): PHP Server, GD Library

Prevent the error loading XML – libxml_use_internal_errors

libxml_use_internal_errors() allows you to disable standard libxml errors and enable user error handling.

MySQL Basic Functions

MySQL Basic Functions - select, delete, update..

Images In Textarea - CSS

Tutorial Images in Textarea

RSS, MySQL & Smarty

Smarty > Publishing MySQL Data in RSS 2.0
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.