I have encountered below scenario: Input amount: 3897 Output: Description : Here I want to find out the length of a series numbers in a given input value (how many time a series number can be come in a given input number) Lets Break down the example to understand what I want : So I need to find out the
Tag: php
How do I select a value from different tables in Query Builder Laravel
So i’m trying to get “promo_type” value from mysql table to excel. However i need to use another table in order to get the value of this “promo_type”. So this is the main table booking, which contains the value of the promo code. Like shown below a user has a promo code of “…
How to get specific (unique code) word from string on php? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year. Improve this question I have text string like : [CLOSED][#SD_1623834126_001] lorem ipsum ? and que…
What are the ways of sending images to my server?
I’m mostly a PHP backend / HTML/CSS frontend developer, so I’ve always sent images to my server from the client using either form enctype: multipart/formdata or through a FormData object when uploading through ajax requests. After that I would receive the file in the $_FILES array. Lately I’…
How do I set up my server to work with PHP
I want to use PHP with a server that i’ve coded my self. (Not Apache etc) I guess I have to send the http request and some additional data from my server to php, but I dont know how to make that connection and how to format that message. I know I can run scripts with php.exe, the problem is
PHP with Kafka – rdkafka
Iam dealing with kafka and php, Im beginner the kafka has been set upped correctly on the server, now am on local I have installed: librdkafka.dll on xamp/php and php_rdkafka.dll on xamp/php/ext and i added this on php.ini: extension=php_rdkafka.dll then, i have created a php page contains this code: Answer A…
Second Graph is not showing up chart.js, mysql in php
I can’t figure out why my second graph isn’t showing on web? I am using chart.js and querying data from mysql, and graphing it. I have two functions drawChat1 and drawChart2. drawChart1 is working fine and showing graph but no data is showing for drawChart2. I left a picture for reference. UPDATE:…
Get text value of the last children of PHP DOM-XML takes too long time
This post is somewhat related to this post: Increase performance of PHP DOM-XML. Currently takes too long time . So it might be better to visit that post first before delve into this post I have an array which contains 7000+ value This foreach loop gets text value inside <mrk> tags in a given XML file I…
PHPUnit – suffix argument ignored in directory tag under testsuite
I recently realized that I cannot run all my phpunit tests at once unless I use the “php artisan test”, and I don’t understand why. I would use the other option but I can’t do coverage with that. I assume it’s somehow related to my configuration file being wrong because of a synt…
how to make Carbon null in laravel?
I’m making a table in Laravel and I want my “besttime” to be a nullable but it’s returning the current time if I keep it empty. (I’m using carbon because I want the H:i format without the seconds) here’s what my input looks like Answer I will suggest you to add mutators in …