Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.