Tagged Questions
0
votes
2answers
24 views
Float Array input to Display For Android
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
...
1
vote
3answers
52 views
Check if array key exists in a multidimentional array
I have an array that's generated using mysql like this:
$conn = connect();
$stmt = $conn->prepare("select id, type, status from arraytest");
$stmt->execute();
$myArray = $stmt->fetchAll();
...
3
votes
2answers
68 views
Sorting a 2d String Array in Java
I created a 2d-array in Java for a project that reads in a file, processes the data, and the prints it back out. The only problem I am having is trying to sort the 2d-array alphabetically.
This is an ...
1
vote
1answer
29 views
Filtering a multi-dimensional Knockout observableArray with ko.utils.arrayFilter()
I have an observableArray that looks something like this:
this.menuItems = ko.observableArray([
{ name: "level1", subItems: [
{ name: "level1-1" },
{ name: "level1-2" }
] },
...
0
votes
1answer
39 views
How to echo multidimensional array variables using PHP?
This question may be very simple and easy but unfortunately I can't answer it correctly.
I have a data set that I obtained from the database then based on a condition I create a new "data set" or a ...
1
vote
2answers
63 views
Convert Array into Ul-Li
i have an array like this
Array
(
[0] => Array
(
[name] => Region
[id] => 3
[parent_id] => 2
[children] => Array
...
1
vote
2answers
54 views
PHP get array child
I want to change last child of array (122) with second child of array (0). You can see with samples. Please help me.
Current version:
Array
(
[0] => Array
(
[122] => ...
-1
votes
1answer
21 views
PHP Insert key into a multidimensional array
I created an empty array ($results) in which I store the data which I get back from the foreach loop. I do this for each search_tags keyword which I set up in an array. It all works, except I want to ...
0
votes
3answers
24 views
Append elements from one array to another array
I have $array1 and $array2 both of them are results from CodeIgniter ->result_array()
ARRAY1
Array(
[0] => Array(
[name] => John,
[course] => ...
2
votes
2answers
91 views
Pasting 1d array into 2d array
I'm trying to paste an array of custom class instances into a 2d array of them in a specific position with this code:
arr.Array.SetValue(stripe, topleft.X, topleft.Y);
…and it gives me a ...
3
votes
1answer
81 views
2D array passing to a function
I've reading this question but I'm not able to get the resulting code to solve the problem.
How should I change this in order to make it work?
void print2(int ** array,int n, int m);
main()
{
...
2
votes
2answers
71 views
PHP check if some keys or values are in a multidimensional array
I have an array structure where I want to check if a key/value is present somewhere in the array. But I want to make the test in such a way that I make a an almost mirrored validation array.
Lets say ...
-1
votes
3answers
26 views
Array Push a Multi Dimentional Array
trying to add the array below into an existing one with array_push:
'tax_query' => array(
'relation' => 'and',
array(
'taxonomy' => 'type',
'field' ...
-2
votes
1answer
76 views
Eliminite duplicates and form a new array [closed]
This is a purely related to merging of arrays
I Have an array as below(This is obtained after querying the database through mysql query):
Array
(
[0] => Array
(
[id] ...
0
votes
4answers
53 views
Multidimensional arrays. Push and then join
Lets say I have the following,
var array1 = ["10", "11"],
array2 = ["AAA", "BBB"],
result = [];
for ( var i = 0; i < array1.length; i++ ) {
result.push( [ array1[i], array2[i] ] );
}
...