Web Design and Development Forums

group similar data in a string?

This is a discussion on "group similar data in a string?" within the PHP Forum section. This forum, and the thread "group similar data in a string? are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > PHP Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 25th, 2008, 22:20   #1 (permalink)
Up'n'Coming Member
 
Join Date: Sep 2005
Location: athens
Age: 25
Posts: 59
group similar data in a string?

Hello all
I didn't know a good way of naming my question, so I am getting straight to the point:
I have a string like the following:
Code: Select all
-----MMMMM------IIIII----MMM---OOOO---I---MMMM-----
Is there any way I can gather and group my information and get, for example:
Code: Select all
6-10:M
17-21:I
26-28:M
32-35:O
39:I
43-46:M
Thank you in advance.
ktsirig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 26th, 2008, 00:33   #2 (permalink)
Reputable Member
 
Join Date: Dec 2005
Location: U.S.A.
Posts: 123
Re: group similar data in a string?

PHP has a ton of string manipulation functions.
http://us2.php.net/manual/en/ref.strings.php

I would grab what I need from the string and build an array. Maybe look at substr() or substr_count().

Good Luck,
Scott
__________________
Web Design
ScottR is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anything similar to PRE tags? Emzi HTML Forum 14 Nov 16th, 2007 15:30
[SOLVED] Apple.com : How to do similar navigation? Ed HTML Forum 24 Oct 28th, 2007 14:28
Learning PhotoShop (or similar)? Legacy_Staff Design & Development Software 20 Dec 8th, 2006 11:20
2 similar input validations on one form bldstr JavaScript Forum 3 Jan 30th, 2006 21:27
New to the Group pahprints Introduce Yourself 8 Jun 15th, 2004 21:52



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 19:18.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59