366 solutions found in php-dev
Page 3 of 19votes
In PHP, I see the word cURL in many PHP projects. What is it? How does it work? Reference Link: [cURL](http://php.net/manual/en/book.curl.php)
votes
Is there a way in PHP to make HTTP calls and not wait for a response? I don't care about the response, I just want to do something like `file_get_contents()...
votes
How can I remove duplicate values from an array in PHP?
votes
I have the following code <?php $error = array(); $error['something'] = false; $error['somethingelse'] = false; if (!empt...
votes
Is it possible to have a PHP function that is both recursive and anonymous? This is my attempt to get it to work, but it doesn't pass in the function name....
votes
Does anybody know the correct way to `post` JSON using `Guzzle`? $request = $this->client->post(self::URL_REGISTER,array( 'content-typ...
votes
I get a strange PHP error after updating my php version to 5.4.0-3. I have this array: Array ( [host] => 127.0.0.1 [port] =&...
votes
What is the simplest way to tell if a user is using a mobile device to browse my site using PHP? I have come across many classes that you can use but I was h...
votes
How can we perform bulk database insertions in Laravel using Eloquent ORM? I am working with an XML document, looping through its elements. I want to accompl...
votes
I want the following output:- > About to deduct 50% of € 27.59 from your Top-Up account. when I do something like this:- $variablesArray[0] = &...
votes
I have a function isNotEmpty which returns true if the string is not empty and false if the string is empty. I've found out that it is not working if I pass...
votes
I've just updated my php version to 7.4, and i noticed this error pops up: > Array and string offset access syntax with curly braces is deprecated...
votes
I have two controllers `SubmitPerformanceController` and `PrintReportController`. In `PrintReportController` I have a method called `getPrintReport`. How...
votes
I know that PHP is compiled to byte code before it is run on the server, and then that byte code can be cached so that the whole script doesn't have to be r...
votes
[Interfaces](http://php.net/Interfaces) allow you to create code that defines the methods of classes that implement it. You cannot however add any code to those...
votes
Using PHP, I want to convert UNIX timestamps to date strings similar to this: `2008-07-17T09:24:17Z` How do I convert a timestamp such as `1333699439` to `20...
votes
> **Possible Duplicate:** > [Reference: Comparing PHP&#39;s print and echo](https://stackoverflow.com/questions/7094118/reference-comparing-phps-pr...
votes
In PHP scripts, whether calling `include()`, `require()`, `fopen()`, or their derivatives such as `include_once`, `require_once`, or even, `move_uploaded_file()...
votes
I am trying to generate a random password in php. However I am getting all 'a's and the return type is of type array and I would like it to be a str...
votes
I want to get the client IP address who uses my website. I am using the PHP `$_SERVER` superglobal: $_SERVER['REMOTE_ADDR']; But I see it can...