Sign in to follow this  
Followers 0
rony2006

2d array to msgbox

4 posts in this topic

Hello,

I have a 2d array and I want to show it in a msgbox. How can I do it?

 

I already displayed it with _ArrayDisplay and in a listview gui but I want something more simple for it like a Msgbox.

Thank you!

Share this post


Link to post
Share on other sites



#include <Array.au3>
Global $aData[][] = [["Row 0", "Column 0"], ["Apples", "Fuji"], ["Color", "Blue"], ["Country", "America"]]

MsgBox("", "Array", _ArrayToString($aData, @TAB))
#include <Array.au3>
Global $aData[10][10]
For $iRow = 0 to 9
    For $iColumn = 0 to 9
        $aData[$iRow][$iColumn] = Random(0, 9, 1)
    Next
Next

MsgBox("", "Array", _ArrayToString($aData, "    "))

 

Share this post


Link to post
Share on other sites

Thanks

Share this post


Link to post
Share on other sites

_ArrayDisplay should be your first choice. _ArrayToString is also possible.

Share this post


Link to post
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
Sign in to follow this  
Followers 0