Questions tagged as 'array'

0
answers

When printing string, nonsense characters are displayed [duplicate]

I need to do a program that calculates the average salary of a company, asking the user for the number of employees, the name and salary of each employee and returning the average, the name of the employee with the highest salary and the name...
asked by 09.09.2018 / 22:06
0
answers

Condition error in string vector in C [duplicate]

I'm having difficulty with a specific exercise: #include <stdio.h> #include <stdlib.h> #include <locale.h> #include <windows.h> #include <ctype.h> #include <string.h> /* run this program using the console...
asked by 06.09.2018 / 21:19
3
answers

How to make the first two numbers of a Math.random sequence are not EQUAL

I made a lottery system in order to learn, I will not post the whole code here just the part that I am packed. It is as follows: The draw of the PC is a sequence of 6 numbers that I present in the DOM (it does not matter), so I want the first...
asked by 05.10.2014 / 07:02
0
answers

I need an array in which the values (dates) are not repeated, the array is generated from a select loop

while ($linha = $pdo->fetch(PDO::FETCH_ASSOC)) { if($linha['previsto_pasta'] == 0){ } else{ echo "<tr>"; echo "<td><div class='previsto'>{$linha['previsto']}</div></td>"; echo "<td><div class='q...
asked by 29.08.2018 / 14:43
2
answers

Read csv file that has header and column with commas

I'm trying to read a ** csv file and save it to an array **, but the problem is that the fourth column of the csv file I'm reading has a comma separated text, and this causes when I read the csv file, php separates the text from column 4...
asked by 28.08.2018 / 05:25
1
answer

Send Cart Session via email with PHPmailer

I have this code that shows the results of the items you have in the cart <?php session_start(); require_once "functions/product.php"; require_once "functions/cart.php"; $pdoConnection = require_once "connection.php";...
asked by 27.08.2018 / 14:44
1
answer

Change background color of the iterative JavaScript select

Hello, guys. I'm having a hard time changing the background color of multiple selects in iteratively. I can already change, but I have to manually specify the index of the element for this to happen. Here's an example of what I'm doing: &l...
asked by 24.08.2018 / 21:06
0
answers

Array divides itself when the elements inside it go from 100 during the api post

I'm trying to make a post for my api, but when the amount of items in my array exceeds 100 it splits up like this: Butmyapionlyacceptsthisarraywhenitlookslikethis: WhatshouldIdotothearraynottosplit?Callingcodetry{$http({url:$rootScope.raiz_w...
asked by 23.08.2018 / 19:17
0
answers

Sort an array when the first letter has accents

I am ordering an array to display a multiselect, but when I change the system language I have some labels that have accentuation in their first letter, by undoing my array and entering the words that have accentuation to the end of the list. >...
asked by 20.08.2018 / 22:28
1
answer

Access row and column of an array

I'm a beginner in php. My code le a csv file and saves it in an array. The problem is that I can not access the columns. I'm using php 5.3.3. Does anyone know how I get the line and the column? This is my role: function readCsv($fileNam...
asked by 15.08.2018 / 06:13