I got a problem with an API (PHP) I created. The API should create a pdf document depending on the data that is sent. The script works perfectly, running it directly on Ubuntu, Plesk is running on. The part that is not working is the following: The tex-file seems not to be touched… no log files or anyth…
Tag: php
how to use Laravel 8 query builder like eloquent for searching
I’m developing a simple CRM with Laravel 8 that needs to search in query string. My query string would be look like: Now the problem is how can I search in controller? I want to do like this: I wonder why its not working and what is the standard way to do this. I’ve tried: but that didn’t wo…
How to use PHP code in inline CSS in HTML
I’d like to use my PHP code in Inline CSS. Let me show the code: This is my code: This is what I want to achieve: But instead, I get this: What can I do to make CSS read 22 from my PHP code? I want to change the width by changing the PHP code. By the way I’m using
Display items with id from an array
So i created a column in my database that accepts JSON array, inside these array are item id’s , i want to create a loop on those ids and insert it in an sql select statements to display all items that has the ids in the array, but im clueless on how to do it. Answer As you are storing
gzip, deflate decompress php [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 months ago. Improve this question I have an encoded string, how do I decode it eNpTNXdSNTJKLSrKLwLSqsaOJUWlqapGzkBOSmpxMlQQSK…
Call to undefined function IlluminateFilesystemsymlink()
I am installing a php script on my server as a test but I’m experiencing this error. Since I am a begginer in PHP language I am having trouble understanding what is wrong with the script code. I enabled debug mode on the application and got this error message ”Call to undefined function Illuminate…
How to rewrite the images path according to the written rules of the url?
I am trying to rewrite the url of an application with parameters. I have a link in the main file main.php. In the index.php file, there is an image tag with the src pointing to ìmages/ folder. All this works just fine. The problem occurs after writing the URL. This is what I have in the .htaccess file I now
PHP – Sum Array key value where 2 or more other keys are equal while keeping array structure
I have this source array(): $source[] My goal is to reduce it so that i get only 1 item where user_id & item_id are the same: $result[] The ultimate way would be to use an array_reduce, but i’ll take a foreach loop. I’ve tried this, but i get an empty array or this, but i get an array with use…
PHP make array element 1.5 bigger than previous one
I have a code below. It needs to make array element 1.5 bigger than previous one. Expected outcome should be … 1, 1.5, 2.25, 3.375.. and so on but i get error (undefined offset) But it doesn’t seem to work. What my code should look like. Answer Your array is empty to start with, so $array[$i] * 1.…
On duplicate key update – implode $row_arr
I have a script in php that writes to the mysql array: $nr_order is the same for all plu in this order. Works correctly. Adds what you need to the database. I would like to do INSERT ON DUPLICATE KEY UPDATE on the same principle I wrote something like this: But this solution writes nothing to the database and…