Linked Questions

12 votes
4 answers
4k views

I have two arrays one for keys and another for values. The values array is an array of array. Keys array: $keyArray = array("clientId","clientName","clientAdsress","clientPhone"); Values array: $...
Gufran Hasan's user avatar
  • 9,429
7 votes
2 answers
6k views

For example if a matrix is: 1 2 3 4 5 6 Then transpose of above matrix will be: 1 3 5 2 4 6 This is my current code: <?php // transpose matrix $trans = array( array(1, 2), ...
Ahmed Safadi's user avatar
  • 4,620
11 votes
3 answers
5k views

According to the PHP Manual, calling array_map with a NULL callback causes it to perform a "zip" function, creating an array of arrays of parallel elements from the given arrays. For example: ...
Austin Hyde's user avatar
  • 27.6k
7 votes
4 answers
8k views

I have created a table that displays a series of numbers in a table. I am trying to transpose the matrix (flip rows and columns) using a for each loop and a function named transpose_matrix but it ...
Aaron Martin's user avatar
3 votes
3 answers
2k views

I am trying to seperate some value by key. My current array like this Array ( [name] => Array ( [0] => test1 [1] => test2 ) [type] => ...
Lemon Kazi's user avatar
  • 3,319
3 votes
6 answers
2k views

Array ( [0] => Array ( [color] => Brown ) [1] => Array ( [color] => Green ) [2] => Array ( [...
Anthony De Meulemeester's user avatar
1 vote
3 answers
4k views

I have three arrays for instance Array1 array (size=3) 0 => string 'a' (length=1) 1 => string 'b' (length=1) 2 => string 'c' (length=1) Array2 array (size 3) 0 => string '$' (length=1) 1 ...
Alex's user avatar
  • 23
1 vote
7 answers
10k views

I have a mysql query that returns an array of rows. How would i populate my html table using php vertically? there is no limit to how many columns i my HTML table allowed. My MYSQL query returns ...
srakl's user avatar
  • 2,619
1 vote
2 answers
4k views

Say you got a table view like this seed_id name country ------- ---------- ------- 1 John America 2 Jose Mexico 3 Khan ...
Average Joe's user avatar
  • 4,641
2 votes
5 answers
4k views

Quick example: $array_1 = [1, 2, 3]; $array_2 = ['a', 'b', 'c']; $array_3 = ['white', 'red', 'blue']; I need an array like: $array_4 = [ [1, 'a', 'white'], [2, 'b', 'red'], [3, 'c', 'blue'...
marin's user avatar
  • 21
0 votes
2 answers
6k views

I have the array below: [1]=> array(2) { [0]=> object(stdClass)#23 (7) { ["AddressesTableID"]=> string(1) "8" ["AccreditNo"]=> string(13) "5129876de28ff" ...
user avatar
1 vote
3 answers
4k views

I have this output: I don't have any idea how can I make my array look like this: $array[ 0 => [ 'item_id' => 6, 'price' => "2311.00", 'qty' => 12, '...
Rbex's user avatar
  • 1,539
1 vote
2 answers
3k views

Having an associative array like $myarray = array ( 'user' => array ( 2 => 'john', 5 => 'done', 21 => 'foo' ), 'city' => array ( 2 => 'london', 5 ...
Luca Borrione's user avatar
0 votes
5 answers
369 views

I am getting this array when form is submitted array 'item' => array 0 => string 'Salt' 1 => string 'Pepper' 'quantity' => array (size=2) 0 => string '2 ...
Adnan's user avatar
  • 1,409
1 vote
4 answers
1k views

$arr = array( 0 => array( 0 => 'one', 1 => 'two', 2 => 'three' ), 1 => array( 0 => 'sun', 1 => 'mon', 2 => 'tues' ...
Vikal Singh's user avatar

15 30 50 per page
1
2 3 4 5
10