View Full Version : Start to end

02-20-2010, 08:46 PM
Do you know if there is a way I can do something like this:

[start]Hello world, hello world.[/end]

What I want, is where I can search for the text inside the start bracket, yet not outside the end bracket.
This would help me a ton in what I'm doing.

I'm not sure what function to use for it though.
Does anyone know how I can do this?
Thanks! :)

02-20-2010, 09:01 PM
$input = '[start]Hello world, hello world.[/end]';

preg_match_all('#\[start\](.+?)\[/end\]#', $input, $matches);


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum