All Questions
348
questions
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 ...
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 |
+------------+------------------------+
...
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 ...
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 ...
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....
-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) ...
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:
[
{
&...
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 ...
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 ...
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&...
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 ...
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 ...
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 ...
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 ...
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 ...