Array is very helpful when you need to save some parameters temporary. In this post, i just want to write the sintax in vb 6.

Declare Array - same with other language declaration variables

Public arr2D() As String

Fill Array - I get data from database, then while looping data, it placed in array.
ReDim Preserve arr2D(DataCount - 1, 2) meaning : because array index from 0, then size array dataCount - 1 and 2 is array size that i want to save (it depends on requirement)

For i = 0 To DataCount - 1
    ReDim Preserve arr2D(DataCount - 1, 2)
    arr2D(i, 0) = i
    arr2D(i, 1) = Trim(rs!id)  
    arr2D(i, 2) = Trim(rs!name)  
    rs.MoveNext
Next

For example Datacount has 3 items, then :

0
 id0
 name0
1
 id1
 name1
2
 id2
 name2

- please correct me if i am wrong, but it works for me.

View Array - after fill array success, then you have to get data array to save or to preview in program.

If (Not arr2D()) = -1 Then   ----------- to check if array is empty
else 
       For i = 0 To UBound(arr2D)
              msgbox arr2D(i,0)
              msgbox arr2D(i,1)
              msgbox arr2D(i,2)
       Next i
End If

It usually looping in looping, but because  I know the size only 3 (2 size in array) , then I just loop 1 times.



When i upload file type 'rar' in CodeIgniter, there is a problem when upload. It showed warning : The filetype you are attempting to upload is not allowed.

The solution is quite simple, just edit in this file : services\application\config\mimes.php
add 1 line in $mimes array : 'rar'    =>    'application/octet-stream',

I think other file type will have that error too if it does not list at mimes.