The ListDeleteAt function is a neat little coldfusion function and works just as well in PHP. This function is good for removing counted values from lists. I use it a lot in conjunction with other list functions. |
The Function: |
<php { |
Usage: |
To use the ListDeleteAt function with the default delimiter ',': <php$list = "a,b,c,d,e,f,g"; $position = 3; echo ListDeleteAt($list,$position); ?> |
The Result: a,b,d,e,f,g. The 'c' which was in the third position has noe been removed! |
To use the ListDeleteAt function with a custom delimiter: <php$list = "12345"; $position = 2; echo ListDeleteAt($list,$position); ?> |
The Result: '1345'. The '2' which was in the second position has noe been removed! |
Blogger templates
Blogger news
Blogroll
Archives
-
▼
2012
(231)
-
▼
December
(19)
- Learn PHP in seconds
- category/tmp/blog_item
- Php Magic constants
- Maximum execution time in PHP
- special data types in php
- Image uploading in PHP
- Qué es PHP?
- PHP Environment
- How to get XML/HTML result set with mysql
- running perl script in apache
- ListContains
- read a file in php
- This Blog Will Reporting Something about PHP in China
- ListDeleteAt
- Database Connectivity
- Remove .php extension with .htaccess
- xml to array
- Testing web Application
- Hit Counter
-
▼
December
(19)