Jump to content

[SOLVED] PHP string/text manipulation extract text that is within certain characters.


Shaun

Recommended Posts

Hi everyone  :)

been a long time since ive been around here.

 

anyhow I need a little help with something.

 

suppose I have a variable

 

$var = "-this is my var-";

 

how would i extract the text that is in between the "-" characters.. I am aware that I would need to use strpos() & strrpos() to do this but im really getting confused on how to actually do it.

 

Any help would be most appreciated.

Thank you! Shaun

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.