Jump to content


Photo

breaking up a string


  • Please log in to reply
2 replies to this topic

#1 speedy33417

speedy33417
  • Members
  • PipPipPip
  • Advanced Member
  • 80 posts

Posted 30 September 2006 - 10:39 AM

What is the best way to break up a string separated by a certain character. I have path saved in $path which could me something like this:
folder1/folder2/folder3/

I'd like to break up the string into
folder1
folder2
folder3

and save it into an array.

Any suggestions would be great.

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 30 September 2006 - 10:45 AM

http://ca.php.net/ma...ion.explode.php
Legend has it that reading the manual never killed anyone.
My site

#3 speedy33417

speedy33417
  • Members
  • PipPipPip
  • Advanced Member
  • 80 posts

Posted 30 September 2006 - 10:48 AM

Easy enough. Thanks a lot.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users