PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
[RESOLVED] size of array returned by split function-VBForums
Results 1 to 3 of 3

Thread: [RESOLVED] size of array returned by split function

Hybrid View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904

    Resolved [RESOLVED] size of array returned by split function

    OK, I've gone senile apparently --- I can't figure out how to get the number of elements in the array returned by the split function. Any help would be appreciated.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: size of array returned by split function

    Use Ubound() or Lbound() to get the Upper and Lower bounds of the array. The lower bound is 0 with the split, so just use Ubound().

    VB Code:
    1. arr() = split(test.txt," ")
    2. msgbox ubound(arr) ' Actual elements are one less!

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904

    Re: size of array returned by split function

    yeah, I AM going senile --- thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width