Skip to content

Tag: php

PHP and javascript Array Literals

I need help, sending data from the server. shaped and I process but I don’t know exactly how to approach individual parameters. you don’t know where the problem is. enter image description here Answer The problem is that the data is coming back as a string, and you’re trying to read it as JS…

For inside of for loop PHP

How i can assign to multiple categories multiple variants like colors, for example i have a product who can be in 3 categories but this product have 3 colors as variants how i can make a mysql structure to avoid insert in same row delimited by comma. There is what is tried: And what i want to do is to

WordPress theme functions.php not used for non-loggedin users

I’m trying to create a function to redirect users to the login page if they are not logged in for some pages, this is my code: As it didn’t work and I tried every simplifications I tried to add a print “hello” at the beginning of the parent and child theme functions.php nothing is prin…

Yii2, get an average value from timestamps

I have a basic table with orders, which have a field thats called created_at which is in timestamp format and I want to get the avarage on how many orders have been created per day. Found a other similar qestion about something like mine question whichI have posted below in the hope that everybody understand …

how to use properly OTRS GenericTicketConnectorSOAP in PHP

I am using PHP version 5.6 . I made a PHP form that have 3 fields, username,password and CSV file upload. The CSV file contains in every line two “number codes” the ticket number and the invoice number divided by “;” , so in that way the CSV have two columns. On the processing code tha…

How can I improve CSV import faster in Symfony?

I have to import CSV file of around 20,000 rows. This CSV is read from FTP Server which will update every 30 minutes. But the code I have written is already taking more than 45 mintues to import. This is very slow. Can anybody please help me. I am thinking of persist the data every based on the batchSize =

How to retrieve certain data in string?

Hello may i know how to retrieve data in string? Output : As you can see the output of the code is as shown above. This is my first time to encounter this kind of output because usually I get json as the output. So my question is may I know how to retrieve the RESPONSE_MESSAGE in the output or

ajax select data with multiple related data

i want to show checkbox looping from db, if i try to select data id_kendaraan in field then show the data from that id. this my view code: my controller: i get data from view $id_kendaraan for my parameter. this my model: but if i try this code, field tahun_beli, id jenis is success to showing in the view. bu…