PHP Explode

Discussion in 'PHP' started by MajHate, Aug 9, 2009.

  1. #1
    Hello,

    I'm trying to work with the explode function. I understand that it breaks up a string, but how can I get the number of pieces or keys? it has been broken up into

    so like, I could get the number in a variable, like: $number_of_keys

    Thank You!
     
    MajHate, Aug 9, 2009 IP
  2. rldowling03

    rldowling03 Notable Member

    Messages:
    1,763
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    200
    #2
    
    $number_of_keys = count($exploded_value);
    
    PHP:
    That should do it for you
     
    rldowling03, Aug 9, 2009 IP