Jump to content

Finding What Is In Between 2 Values (similar to str_replace)


markduce

Recommended Posts

Hello,

 

I need to be able to find what is inbetween 2 values in a string of text.

 

For example,

 

<?php

$string="Hello and welcome to the site. Click [link]welcome.php[/link] here to continue to the site";

 

?>

 

So I need some method of searching the string to see what values are in between the [link] and [/link] which I will then deal with in my own way.

 

I have a feeling that I could do this with explode, but I'm not really sure. Any advice?

 

Thanks in advance

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.