Pinned content
View all 3 collectionsPHP admins have deemed these posts noteworthy.
Common Mistakes to Avoid in PHP
Start learning PHP — Useful resources for beginners and advanced
Can you answer these questions?
View all unanswered questionsThese questions still don't have an answer
The render() method takes a long time to execute Yii2
Problem with request in my react native app
Laravel's ORM query using with() not working with paginate()
Multiple API Requests with ReactPHP
How to Display Related Custom Post Type on WooCommerce Single Product Page Using Custom Fields?
Looking for an extra challenge?
View all bountied questionsThese questions have a bounty on them
How to check status of uploaded inventory JSON to Amazon via (selling-partner-api sdk)
Is there a fix for "Option "--coverage" is ambiguous." in PestPHP in Bitbucket pipelines?
Recommended answers
View all recommended answersThese answers have been recommended
Add key => value pair to existing index of PHP array
You're currently adding the new entry into the outer array. You need to add it to the inner one (situated at index 0 of the outer array). To do that, simply specify the index of the outer array you ...
How to iterate multidimensional array data and sum some values to return a grouped array
So that you don't need to keep track of the indexes of data pushed into the result array nor need to re-index the result, push reference variables into the result array to represent each group. ...
Including a local PHP API that contains exit() statements [closed]
You could treat it as an API and make a HTTP request to it using curl_exec or file_get_contents - that way you'd get basically the same experience as you do if you call it via fetch in your JS. It's a ...
How to set a default value of 1 year from now for expire_at in Laravel migrations? [duplicate]
You can use Carbon (Recommended) $table->timestamp('expire_at')->default(now()->addYear());
Encoding issue ISO-charset vs utf-8 [duplicate]
We call this Character encoding. When you input special characters, PHP converts them to their HTML entity representations. This happens when PHP processes form submissions or access request data. ...
See what's trending
View all trending questionsThese are the most active questions in PHP Collective
How can I prevent SQL injection in PHP?
How do I check if a string contains a specific word?
Reference Guide: What does this symbol mean in PHP? (PHP Syntax)
How do I get a YouTube video thumbnail from the YouTube API?
Deleting an element from an array in PHP
Properly removing API from Laravel project
Understanding Mock Objects in PHPUnit Testing
Understanding the final Keyword in PHP: Preventing Inheritance and Overriding
How to trim (or non-breaking space) in PHP?
Evolution of Type Declarations in PHP
Simply submit a proposal, get it approved, and publish it.
See how the process works