Dude Posted March 8, 2010 Posted March 8, 2010 Hi, i have this arrays $rating_score=_StringBetween($html,"<ratings_score><![CDATA[","]]></ratings_score>") $rating_users=_StringBetween($html,"<ratings_users><![CDATA[","]]></ratings_users>") $rating_average=_StringBetween($html,"<ratings_average><![CDATA[","]]></ratings_average>") How can i join these arrays, so that i can view it (with _ArrayDisplay), each in a own column?
Moderators Melba23 Posted March 8, 2010 Moderators Posted March 8, 2010 Dude, Like this: #include <String.au3> #include <Array.au3> $html = "<ratings_score><![CDATA[score]]></ratings_score><ratings_users><![CDATA[users]]></ratings_users><ratings_average><![CDATA[average]]></ratings_average>" $rating_score=_StringBetween($html,"<ratings_score><![CDATA[","]]></ratings_score>") $rating_users=_StringBetween($html,"<ratings_users><![CDATA[","]]></ratings_users>") $rating_average=_StringBetween($html,"<ratings_average><![CDATA[","]]></ratings_average>") Global $aArray[1][3] = [[$rating_score[0], $rating_users[0], $rating_average[0]]] _ArrayDisplay($aArray) M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Xenobiologist Posted March 8, 2010 Posted March 8, 2010 (edited) Or little example to show how it could be done: #include <Array.au3> Global $a[3] = [1, 2, 3] Global $b[3] = ['a', 'b', 'c'] $c = _ArrayJoin($a, $b) _ArrayDisplay($c) Func _ArrayJoin($first_A, $second_A) Local $re[UBound($first_A)][2] For $i = 0 To UBound($first_A) - 1 $re[$i][0] = $first_A[$i] $re[$i][1] = $second_A[$i] Next Return $re EndFunc ;==>_ArrayJoin In your case #include <Array.au3> Global $a[3] = [1, 2, 3] Global $b[3] = ['a', 'b', 'c'] Global $c[3] = ['@', '€', '%'] $d = _ArrayJoin($a, $b, $c) _ArrayDisplay($d) Func _ArrayJoin($first_A, $second_A, $third_A = 0) Local $re[UBound($first_A)][3] For $i = 0 To UBound($first_A) - 1 $re[$i][0] = $first_A[$i] $re[$i][1] = $second_A[$i] $re[$i][2] = $third_A[$i] Next Return $re EndFunc ;==>_ArrayJoin Mega Edited March 8, 2010 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now