[Help] - Substring Comma Delineated Values

Discussion in 'PHP' started by LeetPCUser, Apr 3, 2009.

  1. #1
    I have a field in my database that has a potential value of x,y,z. I am looking for a way to go through and take out the x y and z and store them into separate strings. The problem is sometimes there is one value, other times two and then other times three.

    It can have 0-3 values.

    1: x
    2: x,y
    3: x,y,z

    Can someone please help.
     
    LeetPCUser, Apr 3, 2009 IP
  2. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I was just told about the explode function. Problem solved.
     
    LeetPCUser, Apr 3, 2009 IP