Questions tagged as 'php5'

2
answers

Add PHP Array data

I have the following arrangement: (this data is sorted by invoice but could be scrambled). $datos =[{"factura":88,"total":41587.3942},{"factura":88,"total":43.01},{"factura":88,"total":1472},{"factura":88,"total":117.98},{"factura":88,"total":...
asked by 08.12.2018 / 01:07
2
answers

Find the matches of a string in an Array

I have this code where I define an array and then there is a String, I want to find the matches for each possible value of the array, in this example I would have to return 2 matches in the string $ searchname but the print_r that I do returns a...
asked by 30.08.2018 / 14:47
2
answers

How to create a redirection file with different destinations in PHP?

I mean, I use advertising on my website. but I have 2 different providers for each advertisement, so what I want is that when a user clicks on the barner, it takes it to a PHP file that contains the 2 destinations, if the user clicks the first t...
asked by 08.06.2018 / 18:58
2
answers

Problem with float numbers in php

How about? I know it's a very talked about topic but I can not find a solution if you can lend me a hand. I have an application in which I calculate the VAT and as the products I offer have different VAT I have decided to add the amount and assi...
asked by 15.11.2018 / 21:41
1
answer

How to pass a ternary operator to conditional if in php?

I recently had a Ternary operation that is copied here below, variable1 += (variable1.length < 1 ? " " : '|') +(array_varible1[elemento_for].length >0 ? array_varible1[elemento_for] : " "); It works perfectly and does everything I'm...
asked by 30.10.2018 / 20:57
2
answers

The jquery .on event does not occur to me

I have the following situation, I am loading a code from Php to html with jquery . What is happening to me is that from the code I'm printing from Php when I show it in the html I do not recognize the jquery selector ( a.deleteComec ) tha...
asked by 27.07.2018 / 01:20
1
answer

Laravel create a multidimensional array

I have a query in mysql that returns a row of records like this, the first field is the marca and the second the modelo , what I try to do with PHP is to mount an array with the following structure to pass it in view of blade grou...
asked by 01.08.2018 / 15:01
1
answer

How to copy a file from one directory to another with PHP?

I have 2 websites on the same linux server, but as is logical, there are different folders, with this code I can copy files within the same domain so to speak. How can I copy a file from one domain to another? and in case I have to use ftp, I ca...
asked by 16.06.2018 / 03:15
1
answer

Execute a PHP Script

I have a script that imports data from one system to another so it is a system that requires time since it passes almost 300,000 records. For this I have created a class with PHP using the laravel framework but I get an error 504 when executi...
asked by 25.06.2018 / 10:09
3
answers

Send the specific value in inputs generated with a FOR

I have this problem I am generating a list of inputs with the same name but different value. <?php if(isset($_POST['SubmitButton'])){ //check if form was submitted $input = $_POST['inputText']; //get input text $message...
asked by 08.03.2018 / 17:54