PHP Collective
Pinned content
View all 3 collectionsPHP admins have deemed these posts noteworthy.
Common Mistakes to Avoid in PHP
- 101
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
fetch specific data from xml content using php
PHP8.4 Doctrine form not filtering item list with multiple checkbox inputs
WordPress REST API: HTML content loses styling when Elementor is active
Why are these simple MYSQL update statements failing
- 62.8k
Replacing "Read more" text on the buttons of post query loop (WordPress archive page)
Recommended answers
View all recommended answersThese answers have been recommended
Set SQL Server LoginTimeout in Laravel
You should put the timeout key at the top level of the array rather than under "options", and it needs to be named login_timeout e.g. 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' ...
PHP-cli running with curl_init but not with file_get_contents, how to enable?
There is no such INI var as user_agent. There is a stream context option of that name, though: $opts = [ 'http' => [ 'user_agent' => 'Mozilla/5.0' ] ]; $context = ...
Populate an array with strings of words where each element is one word less than the previous
I would not try to salvage your coding attempt; I find it too convoluted relative to the simplicity of the task. Basically, you need to use a loop to truncate the input string before its last space ...
autoformat with CS Fixer exited with non-zero code [closed]
PHP External Formatter: Process exited with non-zero code Validate the configuration in Settings > PHP > Quality Tools > PHP CS Fixer by opening your current Configuration by clicking the ...
How can I transform large nested PHP arrays immutably without creating expensive deep copies?
You might want to consider classic PHP programming: $data = ['users' => [ ['id' => 1, 'name' => 'Alice', 'active' => true], ['id' => 2, 'name' => 'Bob', 'active' => false],...
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
Quick guide to Laravel package development
Properly removing API from Laravel project
How to trim (or non-breaking space) in PHP?
Evolution of Type Declarations in PHP
Start learning PHP — Useful resources for beginners and advanced
Simply submit a proposal, get it approved, and publish it.
See how the process works