Current location: Hot Scripts Forums » Programming Languages » PHP » Replace any character


Replace any character

Reply
  #1 (permalink)  
Old 09-22-05, 03:12 AM
ronlar ronlar is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Question Replace any character

I´m looking for a way to replace any character in a text string.

I have created a unique string with uniqid(true), which is 14 character long. I would like to remove 10 of the characters, so that only 4 remains.

Is that possible?
Reply With Quote
  #2 (permalink)  
Old 09-22-05, 05:14 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
http://php.net/substr

PHP Code:

$string substr($string04); 

__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 09-22-05, 12:46 PM
ronlar ronlar is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks a lot. It works perfect.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to replace extended Character with character luv_suresh Perl 1 06-22-05 12:16 AM
form mailer replace character lordy PHP 2 06-15-05 10:50 PM
replace not working.... Mister B. PHP 12 11-07-04 01:41 PM
mySQL REPLACE tinhdangdo PHP 3 08-19-04 04:31 AM
replace pattern-problm with pointers Erev0s C/C++ 0 05-25-04 02:30 AM


All times are GMT -5. The time now is 06:13 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.