Questions tagged as 'array'

3
answers

Saving selected HTML PHP

I have a code of a select field where I need to be dynamically in an array the option selected by the user. Every time the user starts the page, the selected option appears. Here is the code: <?php header("content-type: te...
asked by 08.11.2014 / 20:31
1
answer

How to make an array that increases if the user wishes?

I have a problem in a programming project. The program asks for the following: This is a Question Database (for example, an ENEM, or Vestibular). I need to do some commands like add students, teachers, tell who you are, and if you do no...
asked by 09.11.2014 / 15:08
4
answers

Add element to List (Arraylist)

I am having trouble adding values that are in a List named Processes to the Aptos list. Always show only the last process, and duplicate. Even so, remove all previous processes. Code below: public void verificaTodosProcessosAptos(){ int...
asked by 26.09.2014 / 14:23
1
answer

mysql update using array

I'm having trouble inserting an array into the database ... I tried this script but it only inserts the last id of the array; <?php $_conexao = mysqli_connect("localhost", "root", "", "vbt_posteds"); $id_ind = $_POST["inds"]; $id = "57";...
asked by 25.09.2014 / 16:07
1
answer

CodeIgniter does not register

I'm trying to insert some data into the bank but I can not. Some problem in the array that CodeIgniter returns. The following is the Controller that the form calls: function cadastrar() { $this->load->helper('array'); $da...
asked by 02.10.2014 / 15:29
1
answer

Read a TXT file, sort, and save a new Java file

I am doing a job for college, and I am not able to read the file and play the data inside an ArrayList to sort the data, my code so far public class Teste { /** * @param args the command line arguments */ public static void main(String[]...
asked by 19.11.2014 / 15:13
1
answer

Variable must provide either dimension expression or an array initializer Syntax error on token, misplaced construct

I'm new to programming for Android and would like to fix this error: package br.pedromazer.cantoliturgico; import br.pedromazer.cantoliturgico.R.string; import android.app.Activity; import android.content.Intent; import android.os.Bundle; imp...
asked by 20.08.2014 / 04:02
1
answer

Displaying vector with foreach - PHP

Would anyone have an example of a foreach to display the vector data below? Code: Array ( [empregadoTO] => Array ( [0] => EmpregadoTO Object ( [id:EmpregadoTO:private] => 1...
asked by 20.01.2015 / 22:50
1
answer

Fill values in a vector and ask for position and values

public class teste4 { Scanner op = new Scanner(System.in); int[] vetor = new int[10];{ for (int i = 0; i < vetor.length; i++) { System.out.println("Digite o valor da posição " + i); vetor[i] = op.nextInt(); } }...
asked by 18.09.2014 / 01:11
1
answer

Error in copying structured type vector

Error copying elements from a structured type vector to another vector of the same type : At the end of the code below, I use a function to "start" all the elements of tabela2 (vector that will receive the table contents), but the p...
asked by 29.10.2014 / 16:15