Skip to main content

All Questions

Tagged with
0 votes
1 answer
40 views

Not able to get iteration in curly codes or php correctly

I have uploaded images as follows: image 1 (an image is uploaded) image 2 (no image is uploaded) image 3 (an image is uploaded) image 4 (no image is uploaded) image 5 ...
Meng888's user avatar
  • 31
0 votes
0 answers
29 views

Update Blank Values Until the Next Populated Row PHP/MySQL

I don't know how to explain it well, or how to even ask. Here's some of my data: +------------+------------------------+ | Department | Product Number | +------------+------------------------+ ...
Craig Parker's user avatar
0 votes
0 answers
23 views

Merge parts of elements in multi-dimensional array that have the same key inside elements [duplicate]

I have a multi-dimensional array where multiple array elements will have the same key name inside. Within these matching key array elements are data that I want to combine under one bucket, rather ...
Hayden Rust's user avatar
0 votes
1 answer
33 views

Difference of elements in object where key not always available

I have an array ($data['messages']) of objects, and i want to find mileage difference, so on below example it is 5200-5000 = 200 km. The thing is that the key now always exists. What is the fastest or ...
Tikky's user avatar
  • 1,283
0 votes
0 answers
23 views

Repeat WP Query loop twice

I have a related posts slider but currently there is not enough posts to actually slide. The design is such that it's not a simple case of displaying the posts but not sliding them until there is more....
Mr Toad's user avatar
  • 246
-1 votes
2 answers
60 views

How to get cyclical values on every foreach loop iteration

sorry for the title but I don't know how to explain it well in few words. I'm dealing with a php loop where I need to get particular css classes names and other stuff (such as different svg elements) ...
Paolo Sacchetti's user avatar
0 votes
1 answer
72 views

How can I group an array of samples by the threshold price with samples name as sub array key?

I have an array of product samples that I am trying to group by the threshold price, with the rest of the samples to be accessed by the samples array. This is what I am trying to achieve: [ { &...
dcrean's user avatar
  • 50
1 vote
0 answers
19 views

Iterating through a column in blade.php file

I'm trying to figure how to iterate through this table which shows monthly records provided by different facilities within any one month. As it is, every record from each facility has a month ...
Solo's user avatar
  • 37
0 votes
0 answers
24 views

Object Iteration with DateTime as variable PHP [duplicate]

I have created a ClientUser Class in PHP that contains a DateTime Object as variable. The class declaration looks something like this (I have excluded some of the other attributes as they are not ...
Sebastian's user avatar
0 votes
1 answer
63 views

Php - Count multidimensional complex array values

Have to count number of questions (questions_row_id) evaluator wise and settings wise From the following array: array:3 [▼ 0 => array:1 [▼ 0 => array:3 [▼ "questions_row_id&...
Raiyan Islam's user avatar
0 votes
1 answer
49 views

Iterating over multidimensional PHP Object and changin values by reference

I am trying to iterate over a php object and changing each string value by reference, but something is just not working. In some arrays the strings will not be changed. Anyone has an idea why? Or has ...
testtesttesteettesttesttesttes's user avatar
0 votes
2 answers
645 views

Iterate through JSON String in PHP?

it seems to be a really easy question, but I am a little bit struggling: I am receiving a JSON String via JavaScript. Now I would like to iterate through the element. The resulting string has this ...
JavaForAndroid's user avatar
0 votes
0 answers
37 views

Get Parent Value and Combine To Child Value Using Loop

i have data and want to modify the result using parent and child method. As an example below. I try with following code but have no luck because the last iteration give wrong result as seen on ...
PNBP's user avatar
  • 45
1 vote
2 answers
68 views

How do I apply js code to each foreach element?

I have a php/html code where I iterate over services. And I create modal form by js, but js code is triggered only on the first element iterated over by foreach (php). What can I do to have js process ...
Александр Сучков's user avatar
0 votes
1 answer
30 views

Array Showing Values from previous iteration

I have this code using an api , the first iteration is showing everything right , but at the second iteration is showing the items from the first iteration + the items from the second iteration , and ...
Lucas Ln's user avatar

15 30 50 per page
1
2 3 4 5
24