Questions tagged as 'array'

1
answer

How to move an array in the correct way

Good evening guys, I'm having a lot of trouble with arrays ... I have the following array: array(6) { [0]=> array(1) { ["cep"]=> array(2) { [0]=> string(8) "15070650" [1]=> string(8) "03216040...
asked by 07.09.2018 / 23:13
1
answer

Add items to the array without creating a new level

I have the following routine that generates an array for me: $tipo = "V"; if($tipo == "V"){ $addonTypeSuccess = ["size" => 10, "option" => 'classic', "type" => "volume"]; } $arrayAWSAgregado[] = array( "product_alias" =>...
asked by 25.01.2018 / 20:54
2
answers

Inserting data using PHP array

I have a table and need to insert data from this table through an array. However gives this error: Notice: Array to string conversion in C:\xampp\htdocs\PhpProject1\salvar.php on line 17 My insert where I filled in the values: CHA,...
asked by 29.09.2017 / 16:49
1
answer

Invalid argument supplied for foreach () with correct replacements!

I have the following feature in php : array(3) { ["name"]=> string(12) "module teste" ["status"]=> string(1) "1" ["banner_image"]=> array(1) { [1]=> array(1) { [0]=> array(7) { ["title"]...
asked by 21.09.2017 / 17:14
2
answers

(Segment fault fault) Make a program that receives two distinct sentences and prints inverted

I do not know where the error is. Every time I compile accuse segmentation fault (core dumped) error, can anyone help me? The code is here: #include <stdio.h> int strlen(char *s); char *strrev(char *s); int main() { char frase1[30+1];...
asked by 21.09.2017 / 00:11
2
answers

Error displaying array in PHP

I have this array in PHP and should display the users name and email field. However, php displays an error message: array(4) { [0]=> object(stdClass)#25 (5) { ["idusuario"]=> string(1) "2"...
asked by 07.10.2017 / 19:10
1
answer

How do I get the ID of a user in a ListView and use it as a variable in another Activity?

I'm doing my TCC and I'm having a hard time getting the ID of some ListView user and using it in another Activity (The intention is that when the user holds the click on someone else on the list, popup ) asking if he wants to send a friend reque...
asked by 01.09.2017 / 03:51
1
answer

array repeating results

I'm not understanding why my array is repeating the results, my loop to go through it is like this: for ($i = 0; $i < count($estados); $i++) { foreach ($estados[$i] as $key => $valor) { echo "<option value='".$estados[$i]['co...
asked by 15.09.2017 / 17:29
2
answers

Put two Arrays inside a foreach [closed]

Well, in the case I have two arrays that are received from inputs, based on hotel room rentals, in case each room needs to display Number of adults and children, I got someone's help here on the stack to increase the number of rooms, but I had t...
asked by 19.09.2017 / 03:44
1
answer

Separate array by a certain value

I have an array with the jump number and its value. I need to make a count of the jump value until it reaches 4.00. And continue this count until the end of the jump. salto 1 => 2,00 salto 2 => 2,00 salto 3 => 2,00 sal...
asked by 22.09.2017 / 21:38