Good afternoon.
I'm developing an application with PHP using Laravel, and I'm having a hard time.
I have a table with the name of Account, in which it has the code of this account, represented by the variable $ client-> Code, also has the...
I'm making a cart system here to test the MercadoPago API.
Everything is working except for the part of creating the payment that I have no idea how to start.
MercadoPago API
I'm not very good at messing with arrays, and I'm here to ask...
I am trying to find a way to set up a table with the data of a txt, but I do not know how to separate the values in the array, since they are separated by several spaces, but are identified by fields (Name: : ...);
Example of a txt file:
C...
In PHP we often have more than one way of doing the same operation. A basic example is in checking for the existence of a given index in array : we can use array_keys_exists .
Example:
$arr = ['a' => 1, 'b' => 2];
var_dum...
I have a supermarket carton application where after the end of the sale needs to insert a record with data referring to that sale in a table, this record should include the code of the products bought and the quantity of each.
As I'm using a...
I have a list / array:
var lista['01.um','02.dois','03.tres']
I need to create a new list like this:
lista['01','02','03']
I know little about Groovy and Java,
what is the correct way to create the list?
I'm doing a custom search filter where the user can select the brand and the characteristics of the product and I return the id of them.
But I wanted to return only the last record of my arrays where they contain all the information I need....
In PHP, when I need to mix an array, I use the shuffle function.
So:
$a = array('@wallacemaxters', '@rray', '@CiganoMorrisonMendez');
shuffle($a);
print_r($a);
output:
Array
(
[0] => @CiganoMorrisonMendez
[1] =>...
In Javascript, when I need to do a reduction operation, I use the Array.reduce method.
So:
var valores = [1, 2, 3, 4, 5, 1000];
var resultado = valores.reduce(function (soma, atual) {
return soma + atual;
})
console.l...
I need to check if an array has a specific character (this: |). If it contains, this character must be deleted, and the next word that would be after that character (which actually is a separator of items) would be added in the next index. That...