Is it possible within php to select data from a certain character to another character and display the info within that selection. I dont know if the substr function will be able to do this if so can some one direct me please?
thanks
selecting data from a string
Moderator: General Moderators
an example
say there is info that is in between slashes and I want to select that info and disregard the rest for example:
asdasdasdda/example/asdasdasdas
how do i extract 'example' out of the previous string ?
thanks
asdasdasdda/example/asdasdasdas
how do i extract 'example' out of the previous string ?
thanks
thanks....
well could you at least throw me a bone here, that's kinda what forums are for to help each other out I'm not askin for full blown code it's just the basic function i need i'll look up the rest
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Re: thanks....
The 'bone' is the manual:ridwan wrote:well could you at least throw me a bone here, that's kinda what forums are for to help each other out I'm not askin for full blown code it's just the basic function i need i'll look up the rest
http://www.php.net/manual/en/ref.strings.php
What you asked could be done in a number of ways, look at the string functions and see which one suits the specific task you are trying to do.
People here are more than happy to help out generally but you have to also help yourself sometimes - we can't tell you the specific function you need because we have no idea exactly what you are trying to do (yes you have given us a general idea but that's why you've got a general answer).
Please go look at the manual.
Mac