Jump to content

about arrays


tamir
 Share

Recommended Posts

StringSplits() creates the array for you. Just create the array as variant.

e.g.

Local $t = 'abc|adf|ert'
Local $array

$array = StringSplit($t,'|')

The $array[0] will contain the size, while $array[1] to $array[$array[0]] the elements.

Link to comment
Share on other sites

i have a file:

[]

title1

a

b

c

d

[]

title2

a

b

c

d

and i need to split the text to groups with "[]".

the problem is that when i split it some array pieces are empty (dunno why) so i use "For" loop to check if the value is empty and if it isn't i add it to new array.

u understand my problem?

Link to comment
Share on other sites

u didnt understand my question....

i did the same like u but in the "for" loop i want to check if the array doesn't have empty value. if he doesn't then i want to add him to a new array ($arr).

how do i do that?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...