Ad block is installed and active. Please support us by disabling it.
HomeWednesday, April 25, 2018, 08:52:59
3

PHP Trim

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

This function returns a string or an array with all occurrences of search in subject replaced with the given replace value.

Link Base Pro :: Free Link Index Script

This script allows you to 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.

PHP Form Validation

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

Block Visitors From Specific IP Address

Learn How To Restrict Users From Different IP Addresses.

MySQL Tutorials

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

Inserting form data in MySql table

Inserting form data in MySql table with PHP

MySQL – Select from two tables

Select data from two tables, PHP MySQL

PHP/MySQL Bookmarklet - PHP Tutorial

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

Smarty Paginate Example - Smarty Pagination with PHP

Smarty Paginate Example, Smarty Pagination with PHP. SmartyPaginate: a class/plugin for data set pagination within the Smarty template environment
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.