Jump to content

Narrowing down


evildobbi

Recommended Posts

Hello,

 

I have spent hours trying to figure this out.. What a bugger... Any way..

 

I got a mysql table with a set of keys:

 

CREATE TABLE IF NOT EXISTS `rc_tags` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `tag` varchar(25) NOT NULL,

  `type` varchar(1) NOT NULL,

  PRIMARY KEY (`id`),

  UNIQUE KEY `type` (`tag`)

) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;

 

INSERT INTO `rc_tags` (`id`, `tag`, `type`) VALUES

(1, '/', 'B'),

(2, '\\', 'B'),

(3, '{', 'O'),

(4, '}', 'C'),

(5, '|', 'B'),

(6, '[', 'O'),

(7, ']', 'C'),

(8, '(', 'O'),

(9, ')', 'C'),

(10, '-', 'B'),

(11, '_', 'B'),

(12, '=', 'B'),

(15, '%', 'B'),

(14, '≡', 'B'),

(16, '>', 'C'),

(17, '<', 'O'),

(18, '&#926;', 'B');

 

C = Close

O = Open

B = Both

 

so that if i have a variable that has lets say [=TAG=] it will see how many keys it is in.. SO that example has 2 keys found and I want to get TAG outta all of that.. But with my attempts it tells me [ & = are my open tags.. I can't figure out how to get it to count into the tags such as [ open tag = indent. = 2 open tags now grab TAG and count out =] to escape it..

 

Any help would be appricated.. Hopefully this is clear enough to get some help..

Link to comment
https://forums.phpfreaks.com/topic/181881-narrowing-down/
Share on other sites

OK so if I have a tag with [-tag-]

 

I want to get the word tag.. But when i try this it thinks - is what i want too! so im trying to break into those open and close tags and get the word tag.. But it needs to count how many chars i had to go through to get that and then count it out to make sure its properly opened and closed :P

 

 

Link to comment
https://forums.phpfreaks.com/topic/181881-narrowing-down/#findComment-959257
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.