Questions tagged as 'array'

1
answer

How to construct Array of Objects

I'm trying to build an Array of Objects in JavaScript, but the result is not as expected. This is how I would like it to be: Butthat'showit'sstaying: This is the code I'm using: var wo = new Array(); while ( listItemEnumerator.moveNext() )...
asked by 30.07.2014 / 13:57
2
answers

Array inside array ... using array_push

For purposes of study and better understanding I'm trying to make an array inside another array by adding values using array_push, follow my example: <?php $ar1 = array(); array_push($ar1, 1, 2, 3, 4); foreach($ar1 as $ar) { $ar2 = ar...
asked by 22.09.2014 / 20:42
2
answers

Remove schedules from the array if it does not satisfy a certain amount of periods required

I have an array with the available schedules, these times being in a 30 minute interval: $arrHoras = ["08:30", "09:00", "09:30", "10:00", "10:30", ... , "18:30", "19:00"]; After some filters that are reserved times, I have the following arr...
asked by 19.05.2014 / 17:46
1
answer

How to loop a PHP array

Hello, I have this array that is inside another array and I would like to read it, but I will never know how many keys the array items will have, since it can always be increased or decreased, but what I was trying to do was foreach ($dat...
asked by 19.12.2018 / 12:27
1
answer

Array in PHP that communicates with JavaScript

I have this program that puts selected according to value : <!--inicio if option = selected--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script>$(document).rea...
asked by 07.03.2014 / 14:50
0
answers

Callback in JS with API call

I'm new to APIs and I'm not able to implement a callback to add the elements of an array, ie make a post. I have a submit button that when clicked should read the array and add all the notes to the corresponding students. I have the array studen...
asked by 13.12.2018 / 23:25
0
answers

Loop within the submit button

I have the submit button that should submit the grade to a student class. But when I click the button, it only submits the note to the last student in the list. The list of students and the list of grades are stored in the students array and arr...
asked by 13.12.2018 / 18:04
0
answers

Different position of the array being called. Memory Game on React

I'm making a memory game in React using typescript to learn. In the getCards function, I look for 6 backend cards, put them in an array, duplicate this array, and popup and refresh the screen. private getCards = async () => { con...
asked by 25.12.2018 / 18:53
1
answer

How to store value entered by the user in 2 different arrays?

Well, this code is part of attempting to resolve an exercise. My goal is to convert all Kelvin values to Celcius or vice versa and display all values entered by the user whether they are temperature values in Celcius or Kelvin. For this I have a...
asked by 21.12.2018 / 16:00
1
answer

C # converter Array for insertion into the bank

I have a Array , some of the values of this array will be added as float others as int , my doubts are as follows, how can I convert only one array not the whole list? I would have to create a variable to receive this value...
asked by 24.12.2018 / 15:31