Questions tagged [associative]

This tag is used mostly regarding associative arrays (but better use tag "associative-array" for that) and sometimes in the mathematic sense of tag "associativity", the associative property of binary operations.

435 questions
-2
votes
1 answer

how to loop through the associative array

$myArray = Array ( [Header] => Array ( [@attributes] => Array ( [ShouldRecordPerformanceTime] => False [Timestamp] => 2014-06-11…
Michael
  • 11
  • 2
-2
votes
3 answers

how to match some elements in associative array in php

I have a following array Array ( [0] => Array ( [0] => ) [1] => Array ( [0] => flatrate [1] => flatrate3 [2] => freeshipping ) [2] => Array ( …
Ranjeet singh
  • 794
  • 1
  • 16
  • 38
-2
votes
1 answer

Does the valid bit need to be set in ALL cache lines within a targeted set to access the target line, or just the target line's valid bit?

My wording for this question might not be specific enough, but here's a little more context... When looking for a block in cache, the controller selects the set first. Then does it, 1) Test all valid bits in selected set and "return" a cache miss if…
-2
votes
2 answers

How to use an associative array value for calculation in PHP?

I am performing a calculation using the user input and associative arrays. Below is my PHP code $class = $_POST['class']; $size = $_POST['size']; $gasket = $_POST['gasket']; $connection =…
-2
votes
2 answers

Can't understand why an array is set but array is null after processing

Line 42 is the error. I'm not sure as to why it keeps saying it's not an array is one section but fails to find the array on line 42. I have tried to change the line to ($_POST['CINS'] as $cNum => $v) and ($CINS as $cNum => $v). Any insight or help…
Nick
  • 1
  • 1
-2
votes
2 answers

php and mysql_fetch array

I'm having trouble with this script and I would appreciate any here:
Alan Williams
  • 35
  • 1
  • 8
-2
votes
2 answers

Dynamic add element to multidimensional associative array

I am trying to insert new element into multidimensional associative array like $arr=array('ID' => 123, 'name' => 'rock', 'accountID' => 'u0777f7f-77f7-4d2e-9h7c-ea775d052785', 'admin' => array ( …
rock
  • 25
  • 1
  • 4
-3
votes
1 answer

PHP insert array associative - i want to insert a value to existing array in assosciative array

i got question How to insert value to a existing array, and my expetation of result is like : Array ( [id] => 11 [title] => Lorem ipsum [view] => 3445 ) But what i have did is : '11', 'title'=>'Lorem…
ryanpandu
  • 3
  • 2
-3
votes
1 answer

Single array to multiple array javascript

y have an array associative and want to save multiple arrays with only one key value like that: [ key1: value1, key2: value2, key3: value3 ] [ key1: value1 ] [ key2: value2 ] [ key3: value3 ]
Leandro Matilla
  • 911
  • 4
  • 14
-3
votes
2 answers

Split associative Array

I have an associative array as below. I need to split it in 2 or more parts whenever subcategories are more than 5. Is it possible ? I need javascript code to split this array dynamically so that one category should have only 5 subcategories and if…
Shifali singla
  • 76
  • 1
  • 2
  • 8
-3
votes
1 answer

Create Multidimentional Associative Array from Database

I'm having a problem trying to make an associative array that would looked like : Array( Array('111.01.0040' => 'PEMBENAHAN PIPA TURBIN'), Array('111.01.0041' => 'PENGELASAN UNVIL'), Array('111.01.0042' => 'BONGK.PASANG…
-3
votes
1 answer

How to sort PHP arrays chronologically with an associative?

I'm making a website for a music promotion company. For each artist I have a seperate array containing event information, like this: "March 18th 2013", "artist" => "Don Ross", …
-4
votes
2 answers

PHP- associative array (structure)

Could anyone explain how does structure of that array look like? $result['results'][0]['geometry']['location']
MattBuk
  • 25
  • 1
  • 6
-5
votes
1 answer

initialise list with every element is a an associative array and last elment of the associative array is two d array in perl?

I'm trying to create a database .Each element in list contains details in the form of associative array and the last element of each of these associative array is a 2-d array,i need help initializing it ..
Sayan Paul
  • 91
  • 1
  • 13
-8
votes
3 answers

Get PHP associative array from MySQL

Iam trying to place data from SQL into array and simultaneously make the same array associated with name of source columns. This is function, what I got: GetRowFromDb("`id`,`name`,`email`", " WHERE `id`='1'", "database1", "table1"); function…
1 2 3
28
29