2
votes
2answers
993 views

String with array structure to Array

I have string: Main.Sub.SubOfSub And some kind of data, may be a string: SuperData Also I have an empty array: $k = array(); How I can transform it all to this array above? Array ( [Main] ...
1
vote
4answers
701 views

use strings to access (potentially large) multidimensional arrays

I am having trouble figuring out a way to simply parse a string input and find the correct location within a multidimensional array. I am hoping for one or two lines to do this, as the solutions I ...
2
votes
2answers
269 views

reliably convert string containing PHP array info to array [duplicate]

Possible Duplicate: Simulate php array language construct or parse with regexp? suppose I have the string $str = "array(1,3,4),array(array(4,5,6)),'this is a comma , inside a ...
3
votes
1answer
5k views

Create, populate and return 2D String array from native code (JNI/NDK)

I'm finding this particular bit of code quite difficult (Not least of which because I only started playing with C a week ago). I've been trying hard to find the right syntax to correctly create a ...
0
votes
3answers
10k views

For each result in MySQL query, push to array (complicated)

Okay, here's what I'm trying to do. I am running a MySQL query for the most recent posts. For each of the returned rows, I need to push the ID of the row to an array, then within that ID in the array, ...
5
votes
3answers
7k views

convert a string into a two-dimensional array in javascript

I'm trying to convert a string like this "10|15|1,hi,0,-1,bye,2" where the first two elements 10|15 mean something different than 1,hi,0,-1,bye,2. I would like to separate them from each other. A ...
1
vote
1answer
379 views

Python Converting String into fixed Column Array

In case my question gets lost in the below, what I need to present to my home automation system is an array that I can retrieve information from on a cell by cell basis. I am using the following code ...
1
vote
1answer
567 views

mapping postgresql text[][] type and Java type

I've a postgresql table contains a field of type text[][]. In JDBC code i've used a String array, but an exception told me that theres no matching between type. If there's no mapping between types, ...
0
votes
3answers
1k views

converting string into multidimensional array

I'd like to convert this string: $credit_packages_string = "300,0.25|1000,0.24|3000,0.22|4000,0.20|5000,0.18|6000,0.16|7000,0.14"; into this array: $credit_packages = array( array( ...
2
votes
2answers
934 views

Sorting multidimensional array in Delphi 2007

I have a multidimensional array similar to the one described below: Matrix => array( [0] => array( [0] => 7, [1] => 'hello' ), [1] => array( [0] => 3, [1] => 'there' ), [2] ...
0
votes
2answers
52 views

Adding elements to a multidimensional Array

I currently have an ArrayList (mapArray) such that each element of the ArrayList contains a String such as: ################ So the ArrayList could look as such: ################ #..............# ...
0
votes
1answer
807 views

convert string from args[0] into char then populate and print a 2d array with the chars

public static void main(String[] args) { String input = args[0]; String [] part = input.split(" "); //splits string into 2 parts (action and characters to encode) String action = ...
0
votes
1answer
245 views

Reading comma seperated values from a file storing in a 1D and 2D array

I have a code as below which would basically read a file with contents which look like Auckland,Hamilton,Rotorua,Wellington 0, 125, 235, 660 125, 0, 110, 535 235, 110, 0, 460 660, 535, 460, 0 Now ...