Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

I have a button <a href="like.php?type=user&id=<?php echo $user_data['userid'] ?>"> <input id="post_button" type="button" value="Sledi <?php ...
user2980341's user avatar
2 votes
3 answers
187 views

I have an array that contains other associative arrays as its values. Each one of these "sub" arrays is mapped with key-value pairs: $items = [ ['type' => 1, 'text' => 'A'], ['...
quietWind01's user avatar
-1 votes
1 answer
48 views

I'm trying to write a SQL query to hit my WordPress database as I need some of the info for my front end. However, I'm not getting anything from it. I can see the info in the database itself, so ...
jstrother's user avatar
  • 358
-1 votes
1 answer
87 views

we have to multi-dimensional array and we need to check some value of every element from array 1 to array two on a specific element key. we can use following code for handle this types of complex ...
Sonu Rajput's user avatar
0 votes
1 answer
34 views

I want to remove duplicate values by comparing two array type column values. I want to get the result of subtracting the fruit I already ate from my favorite fruit. But if there ara 2 apples in your ...
krchoi's user avatar
  • 1
1 vote
1 answer
503 views

I have this nested multidimensional array for orders [ [ 'created_at' => 1991, 'updated_at' => 1992, 'customer_name' => 'john doe', 'line_items' => [ ...
John's user avatar
  • 51
0 votes
1 answer
21 views

I am trying to build a web-gui for jaredhendrickson13/pfsense-api (https://github.com/jaredhendrickson13/pfsense-api) Either I can't get array indexes on return or they not there. I am using laravel8 ...
zehyr's user avatar
  • 41
0 votes
1 answer
136 views

I have a multidimensional array and need to remove entries with the same values for a key. eg. Array ( [0] => stdClass Object ( [id] => 1177930857 [lat] => 24.479280471802 ...
geeth's user avatar
  • 714
0 votes
1 answer
216 views

I have an object as below, {"metaData":[{"name":"a"},{"name":"b"}],"rows":[[1,2],[3,4],[5,6]]} I would like to change it to [["a"=...
Wahsei's user avatar
  • 307
1 vote
1 answer
419 views

I have a table in PostgreSQL that has array column like abc_id varchar[](1) and it has data in it like {A,B,C}. I want to create that table in Synapse SQL how can I create array columns is it possible?...
Berkay ÇİLOĞLU's user avatar
1 vote
2 answers
361 views

I'd like to take a Spark LDA Model's term indices from the .describeTopics() output and match them to the appropriate term in the count vectorizer's vocabulary. Here is the point of friction: terms = [...
Chris A.'s user avatar
  • 455
2 votes
1 answer
2k views

Entity I have it entity with a property that is text[]: @Entity(name = "entityname") @Table(name = "tablename") @ToString @TypeDefs({ @TypeDef(name = "jsonb", ...
Jose Amadeo Diaz Diaz's user avatar
1 vote
3 answers
205 views

I want to get all of the values from an array with 3 levels where the key is age. How can I extract a column of data from a three dimensional array without using a foreach() loop? My input array: $...
manishk's user avatar
  • 546
0 votes
1 answer
741 views

I have a Spark dataframe in a SparklyR interface, and I'm trying to extract elements from an array column. df <- copy_to(sc, data.frame(A=c(1,2),B=c(3,4))) ## BUILD DATAFRAME dfnew <- ...
Jeff's user avatar
  • 70
0 votes
1 answer
643 views

I have a json file with this content : [ { "id": "apple", "symbol": "app", "name": "Apple", }, ] I Want To Search In ...
Amin Arjmand - امین ارجمند's user avatar
1 vote
3 answers
60 views

I have a json file that looks something like this: { "world": { "france": { "city": { "city_1": { &...
Creatz's user avatar
  • 61
0 votes
1 answer
371 views

I have a view in a laravel project where I have to print the sum of some array columns. I Have this kind of code to achieve the result: @foreach($data as $row) ....... @foreach($row as $key => $...
DannyV's user avatar
  • 19
-3 votes
1 answer
1k views

I have a multidimensional array with four levels of data. Here's a small sample: $data = [ [ [ 'Date' => '2021-03-15T00:00:00.0000000+01:00', 'Arena' => ['Id'...
mathias5's user avatar
  • 311
7 votes
5 answers
615 views

Let's say I have 4 arrays with the same amount of values in each: $array1 = array(0, 7, 5, 0); $array2 = array(2, 6, 10, 0); $array3 = array(4, 8, 15, 10); $array4 = array(6, 7, 20, 10); I want to ...
KarelRuzicka's user avatar
2 votes
2 answers
88 views

I have the following array. Array ( [0] => Array ( [product] => p1 [item] => q1 [date] => d1 [status] => N ) [1] ...
Sachin Sanchaniya's user avatar
0 votes
2 answers
49 views

I have a multi-dimensional array of fencer ids with 3 attributes (see code below) Array ( [0] => Array ( [id] => 5255 [ratio] => 1 [...
KMarcell KMP's user avatar
1 vote
1 answer
745 views

Newbie trying to figure out the best way to design a Postgres db for the following use case scenario. There is an Account table for the business customers and there is a contacts table with a column ...
swampmusic's user avatar
2 votes
1 answer
125 views

I have used a .txt file (T_in1) as an input in a 2D-CombiTimeTable in Modelica. It contains an array with the size of (4,2); the first column is time and the second one is the time-dependent variable. ...
AJodeiri's user avatar
  • 314
0 votes
2 answers
2k views

Is it possible to get a result from array_column that has values only? sample array i want to array_column $array = [ ['name' => ''], ['name' => 'John'], ['name' => 'Doe'] ] when i ...
royudev's user avatar
  • 53
0 votes
2 answers
416 views

Lets suppose we have an array of arrays that needs to be converted to rows From this: Array ( [subject] => Array ( [0] => EDN:LOC:DERR [1] => EDN:LOC:...
Splatrac's user avatar
  • 965
2 votes
2 answers
164 views

I'm in the process of learning Rust, but I could not find an answer to this question. In PHP, there's the array_column method and it works this way: given an array of arrays (this would be a a ...
Life after Guest's user avatar
1 vote
1 answer
486 views

I have a nested array like so $array = array( [2] => array( [5] => array( [7] => array( [46] => array() ) ), [108] => array() ),...
Leopold's user avatar
  • 27
-2 votes
2 answers
216 views

[0] => Array ( [id] => 004002718 [price] => 5.00 [category] => x ) [1] => Array ( [id] => 030285882 [price] => 8.99 [...
dean2020's user avatar
  • 665
3 votes
1 answer
674 views

In a production environment that uses the Yii1 framework and PHP 5.6.40, the array_column function is returning an empty array. The array is a list of CActiveRecords from another CActiveRecord's ...
hutch90's user avatar
  • 351
0 votes
2 answers
125 views

how to get index of repeated data from a multi dimension array using array_search() or array_column() method function Search($value, $array) { return(array_search($value, $array,false)); } $array =...
Pratish Jha's user avatar
0 votes
1 answer
55 views

I have a MariaDB with articles and each article has a date. I want to display a bar chart with number of articles per date. I get the data with this code: $statement = $pdo->prepare( " SELECT ...
mars's user avatar
  • 40
1 vote
3 answers
475 views

I have a 2d array like this: [ ['name' => 'Banana', 'quantity' => 124], ['name' => 'Cherry', 'quantity' => 24], ['name' => 'Apple', 'quantity' => 224], ] How can I sum ...
popol's user avatar
  • 213
2 votes
3 answers
311 views

I have a PHP code which runs on PHP7 but not in PHP 5, which PHP version in my server, that is my code: Array ( [0] => stdClass Object ( [userId] => 15 [name] => name0 ...
Ali A. Jalil's user avatar
4 votes
4 answers
944 views

I am aware of the fact that I can usort an array by one column using something like this: function cmp($a, $b) { return $b['column'] - $a['column']; } usort($array, "cmp"); This simulates the ...
Keaire's user avatar
  • 899
1 vote
4 answers
3k views

I have the following dataframe in pandas: id name categoryids shops 5 239 Boulanger [5] 152 3 196 Bouygues Telecom [5] 500 4 122 ...
jcf's user avatar
  • 602
1 vote
1 answer
13k views

I have used this function to get multi column from array. Alternate of array_column. I have created this function as array_column not work according my requirement. My Data $students = Array ( [...
Suhail Siddiqui's user avatar
1 vote
2 answers
159 views

I want to print all unique Department values from a multidimensional array as a comma-separated string, but not all rows have a Department value. The boiled down version of my array looks like this: $...
stuart's user avatar
  • 57
1 vote
2 answers
336 views

I am trying to remove duplicates from two dimensional array based on client ID. The script removes all duplicates EXCEPT the first value, first client. I have tried few more ways of comparing result ...
Wesan's user avatar
  • 57
1 vote
2 answers
405 views

Summary: I'm looking for a proper way to sort a 2D (multidimensional) array by the column sequence in AutoIt. I'm quite familiar with AutoIt and there is the _ArraySort function which provides a ...
user avatar
0 votes
3 answers
129 views

how can I check and delete duplicate arrays? Example: $a = array( array( 'id' => 1, 'name' => 'test' ), // Next array is equal to first, then delete array( 'id' =&...
Vinícius Duarte's user avatar
-3 votes
5 answers
100 views

Array ( [0] => Array ( [id] => 21153 [genre] => ["History","Drama", "Thriller"] ) [1] => Array ( [id] => 21152 ...
Prakash Kumar Guru's user avatar
-1 votes
4 answers
509 views

The following code exports the whole array into the .csv file, but I only want to export a specific column. <?php $test = array(array("eric", 7),array("nancy" ,8),array("dave", 10)); $fp = fopen('...
gaurav chhabra's user avatar
0 votes
2 answers
83 views

I need help to replace some specific subarray indexes with associative keys in my multidimensional array. My data is coming from an xml file from another system. For my next process (Import in ...
CellePelle's user avatar
1 vote
1 answer
311 views

I have a list of dictionary and I want to get only a specific item from each dictionary. My data pattern is: data = [ { "_id": "uuid", "_index": "my_index", "_score": 1, ...
MH2K9's user avatar
  • 12.1k
0 votes
2 answers
48 views

I'd like to get a unique word count including all strings in an array column. Input: [ [ "Query" => "hehe haha hihi", "Merry" => "1.11"...
hrca's user avatar
  • 3
-1 votes
4 answers
146 views

Let's say I have an array: [ {0:1, 1:5, 3:null}, {0:4, 1:null, 3:null}, {0:null, 1:5, 3:5} ] I want to count non-null values per associative key so that my expected output is: [{0:2, 1:2, 3:1}]
Wayan Tisna's user avatar
5 votes
4 answers
15k views

Is there function that works similar to array_column for multidimensional arrays? Is there a function that translates the first array below to the second: Array ( [0] => Array ( ...
jcropp's user avatar
  • 1,246
2 votes
3 answers
1k views

I wonder if there is a faster way to sum i.e. the weight of each item by qty. $items = [ [ 'qty' => 1, 'weight' => 1, ], [ 'qty' => 2, '...
cottton's user avatar
  • 1,647
0 votes
3 answers
783 views

I have an associated array, $array2 = array( array('customer_id' => '01', 'categories' => '',), array('customer_id' => '02', 'categories' => '',), array('customer_id' =>...
hakkim's user avatar
  • 658
1 vote
1 answer
74 views

Currently, this is my code, but it doesn't work: //$queryBalance is the array received from an sql select foreach ($queryBalance as $index => $runrows){ $val = $runrows->balance; $val ...
alexandre9865's user avatar