0
votes
1answer
27 views

SQL SELECT rows from one table using an array taken from another table

I need to do something like this: $user_id = (int) get_logged_in_userud(); **$thread_ids** = $wpdb->query( "SELECT thread_id FROM $tableName1 WHERE user_id = %s), $user_id); $iterateRows = ...
0
votes
0answers
17 views

Array to cycle through If statments then compare terms to remove duplicates?

So i put a question similar to this earlier. Got the foundations working, removed question, and now completely broke it... I am trying to get a array to be based on a if term = 7pegi, then use 3pegi ...
0
votes
1answer
15 views

Adding data to a reference to change the referenced array in PHP

I have built a function to retrieve the last specified key of an array, it references the array and displays it fine, however, when I try to add to the reference variable, it does not affect the ...
0
votes
2answers
33 views

Faster parsing of array in php

I have a CSV file with 40 000 lines, i load ALL THE LINES in a array and i use this function to return a subarray with just the value i need... here is the code <?php ...
0
votes
1answer
32 views

retrieve only certain values from an object in a nested array?

OK i have the following array: array(2) { ["campaigns"]=> array(50) { [0]=> object(Campaign)#2122 (48) { ["name"]=> string(26) "FOO" ["id"]=> ...
0
votes
2answers
26 views

Can't get PHP to pull line entry from mySQL as array

Ok fellas, I've been working with a SQL database via PHP for a couple days here now at work and I cannot for the life of me get it to work I have someone else who worked on this project and they have ...
1
vote
0answers
39 views

PHP array handling on-the-fly

I am trying to use the PHP error_get_last() function, but my question goes more to general handling of arrays in PHP. error_get_last() returns an array, but I only want the 'message' element from ...
0
votes
2answers
39 views

How to create two columns PHP?

I am having the worst time trying to create this, it should be simple. I have an $info array that consists of $person=>$personInfoArray and I am trying to say, for the first six, do one column, for ...
0
votes
1answer
20 views

PHP Scrape - Create multidimensional arrays from results - current code only returning one result

I'm quite new to PHP and am creating a web scraper for a project. From this website, https://www.bloglovin.com/en/blogs/1/2/all, I am scraping the blog title, blog url, image url and concatenating a ...
0
votes
0answers
34 views

How to Post object array to php

I am working on an asp.net application. I need to call php webservice.I am using Asp.net web Reference to connect the webservice. I need to pass a object array. But WebReference class not correctly ...
0
votes
4answers
25 views

Merge Multidimensional Arrays

I have a somewhat complicated function that builds an array structure dynamically to insert fields into MongoDB. We store the structure in MySQL. The function outputs the following array structure: ...
0
votes
1answer
26 views

PHP doesn't compile when there is a space before array creation

So I just spent 30 minutes trying to debug my code, when I finally understood that: $words = array("word", "word", "word"); // doesn't compile $words =array("word", "word", "word"); // Does compile ...
0
votes
3answers
54 views

php loop through array within array - output array value and key

I have the following array structure in place that i have to keep as it's an existing website: $label_options = array( "label_size" => 'A4', "label_position" => 'Top', "label_qty" ...
0
votes
1answer
21 views

Wrapping each child key within an UL

I'm wanting to wrap each child array within an <ul>, but I'm not entirely sure how it may be done? function RecursiveWrite($array) { foreach ($array as $v) { echo '<li>'; ...
1
vote
1answer
23 views

MySQL Update column if value equal to any value of an array

I have a table with a column that store a number. I also have 2 different array: the first one store the value to check, the second one store the new value to save in the column. I need a query that ...
0
votes
1answer
32 views

Arrays names PHP Concatenation

How can I concatenate arrays in PHP5 without repeating the name? This is what I tried to do, but it doesn't work: $thisProduct = $data['deliveryMethod'][1209]; $thisProductReceiver = ...
0
votes
2answers
36 views

Parse array with a array inside to PHP

I have array in my JS and I have to parse it to PHP: var transfer_data = { cl_name : $("#free_1_1_title").val(), contact_name : $("#free_1_1_name").val(), ...
0
votes
2answers
40 views

sorting some weird array in php by a value

How can i sort something like this $a = array( 0 => array( 'field' => array( 'id'=>'valueid' ) ) ); by ...
0
votes
3answers
60 views

How can I manipulate my array, so if there is a scan within 60min with the same

This is really hard to explain, but i will do my best. I have a array called arrayoftransationcs which contains 4 strings. *SCAN, MEMBER_ID, RESTAURANT, TIME, PAID. If a scan is paid, it will ...
-3
votes
1answer
38 views

Different size strings to multi dimensional array [on hold]

I have different size strings that look like this Foo > bar > baz Or this Foo > baz I would like the array to look like this $arr = array(foo => array( bar => array (baz ))); ...
0
votes
1answer
27 views

form - output empty checkboxes (array) in a foreach loop (PHP)

I got a problem & don't get the solutions, hope you can help me! I created a form which have visitors with optional a guest. The sense of the form is to delete the visitor and the guest. Now you ...
1
vote
1answer
35 views

Adding to a multidimensional array from another array

I'm trying to figure out how I would do this, basically I want the function to add to the following array: $this->array['key1']['key2']['key3'] = 'value' From a single dimensional array like ...
-2
votes
0answers
17 views

How is it possible to make query on a csv file in php

I know and use mysql and php. But now i have 15 csv file. I have found that some pyton lib exist to make query on csv file. The question how is it possible to make mysql lome query on csv file ? ...
0
votes
0answers
30 views

sending javascript global variables after being modified in function call [duplicate]

I have a global javascript array and I make a function call that makes other function calls. In displaySearch() im supposed to push information into the array that gets return by an API call. Stuff ...
-2
votes
1answer
17 views

Return array's element thst is not set?

I have an array $lang containing several keys=>values $lang['Contacts'] = 'Kontakte'; etc how can I grab the array's key's name ('Contacts') IF THE VALUE IS NOT SET and the array element is not in ...
0
votes
5answers
28 views

How to append every array element to the previous array elements inside of a loop

I've tried my best but I can't seem to figure out how to even word the question correctly for this. So I've started off by splitting up a string into an array where spaces occur. $str = "a nice and ...
0
votes
1answer
14 views

Enable Not Null Textbox

I have an array of Textbox, by default they are all disabled... Some Textbox are empty some are not based on the return values of my query... while ($imps_row1 = ...
0
votes
1answer
21 views

Problems using homemade mod function to index array

This is one of those questions where each little part seems to do what you want it to, but they won't work together. Big picture: I'm running an experiment where each new visitor to the web page is ...
0
votes
2answers
18 views

Challenges with mysql_fetch_array()

I'm running into a situation where a mysql_query() result being fed into a mysql_fetch_array() function is being interpreted as a boolean instead of the result. The below code uses Using an SQL ...
0
votes
1answer
23 views

Group related elements in array

I have an array in the following format: [8106] => Array ( [id1] => 210470 [id2] => 216298 ) [8107] => Array ( [id1] => 210470 [id2] => 187145 ) [8108] => Array ...
-2
votes
0answers
23 views

remove the blank element and/or line from list generated [duplicate]

I have code below which disables any blank lines generated by a drop down list, this is good but I need actually remove those lines, is there a way I can do that rather than leaving those blank lines ...
0
votes
0answers
40 views

PHP Array: changing values

I have this array: Array ( [0] => Array ( [menu_id] => 8 [menu_children] => 0 [menu_voce] => Eventi [menu_alias] => ...
1
vote
1answer
24 views

Multi cURL only uploads one image

I have the following code to upload images to a external server. The problem is that it only uploads one image from the array instead of all images in the array, where is the problem :)? $images = ...
0
votes
0answers
15 views

Cannot load simple associated products of a configurable product [magento]

This function loads the products, then puts only specific values of them into an array that is being returned: private function _getRequestProductSize(){ $ordernumber = ...
0
votes
3answers
42 views

Merging arrays in PHP

I have an array with a bunch of 1 - 10 results, i need to find a way to merge the two, I am new to php so I may need some help Array ( [906] => Array ( [id] => 906 [form] ...
0
votes
1answer
37 views

unable to unserialize an array

I want to cache an assoc array with about 3.5k elements (using Memcache). I just stored the data into a var and called serialize($var). And even if i try to echo var_dump(serialize($var)) I am ...
1
vote
6answers
61 views

PHP Invisible string

I have this array of string: array(59) { [0]=> string(25) "shadowcores.twifysoft.net" [1]=> string(11) " " } Obviously there are 57 elements more. I need to know how can I remove ...
0
votes
2answers
45 views

Replace array inside array with PHP

The goal Replace this: ( [0] => 'Header' [1] => 'Body' ) For this: ['Header'] => Array ( [0] => Hello! ) ['Body'] => Array ( [0] => This is ...
1
vote
3answers
49 views

PHP array merging results with “and” and “&”

I have an array of results, this array is sorted into another array that lists them in order of most mentions: $array = get_cforms_entries(); /* all data, no filters */ $keywords = array(); ...
0
votes
2answers
16 views

PHP imagick or GD merge image from an array

I was looking in google but I can't find any solution. I need merge multiple png file via php. Everything works when I declarate image path like this: <?php $img1 = new ...
-1
votes
1answer
48 views

Convert PHP String To Array

My String is a comma separated list of id numbers e.g. 81234567,81234569,44489000,123,9585,1023 I want to convert each part to an array, without the comma, so i can run a foreach, to query an ...
1
vote
2answers
43 views

PHP Array Keyword Tally

I have an array: [873] => Array ( [id] => 873 [email] => [data] => Array ( [#1] => Dmitri Vegas & Like Mike ...
0
votes
0answers
11 views

Drupal 7 Flag Module - get user flags views or php

I am having a tough time creating a view that will list the flags that a user has set. Basically this is supposed to make it so when you visit a users page we can see a list off al the users the the ...
2
votes
1answer
26 views

Array multidimensional if array_combine has duplicated key

The goal Make this: Array ( [Title] => 'Hello!' [Layout] => 'Shared/_Master' [Section] => Array ( [0] => Header [1] => Body ) ) The problem I'm ...
0
votes
4answers
42 views

two values in a multidimensional array in php

Basically what Im trying to do is have an array of events and in it will hold the title and date.. So what i have so far is a wordpress loop of a custom post type pulling in the title and the date ...
-1
votes
1answer
27 views

Need help changing table array by moving a column in PHP

I have been handed the task of making some changes to a PHP webpage that was coded by someone who has left the company and my Php is exactly exeprt. The page in question displays a database table in a ...
0
votes
1answer
65 views

PHP exploding string, strange result

I'm making a tiny autoloader for my kickstarter projects and I have a problem that is a bit confusing me. I've made a loader class that accepts an argument that must contain underscores to know where ...
-2
votes
1answer
37 views

Combine php array duplicate values

I have a php array that just like this: Array ( [0] => Array ( [product] => 2 [price] => 30 [qnty] => 1 ) [1] => Array ...
0
votes
2answers
55 views

How to sort array keys by other array keys?

For example i have two arrays like: $first_array = array( 1 => 'a', 2 => 'b', 3 => 'c', 4 => 'd', 5 => 'e' ); $second_array = array( 1 => 'not important', ...
0
votes
1answer
31 views

in_array not working from fetch_array created array

I am having difficulties with an array. I have a table in my DB with a many to many relationship, where by an employee can have multiple skills and a skill can be associated with multiple employees. ...

15 30 50 per page