How-to articles, tricks, and solutions about PHP
How to display string that contains HTML in twig template?
To display a string that contains HTML in a Twig template, you can use the raw filter.
How to enable PHP short tags?
PHP short tags are a shortened version of the standard PHP opening tag.
How to escape strings in SQL Server using PHP?
In PHP, you can use the sqlsrv_real_escape_string() function to escape strings in SQL Server.
How to find array / dictionary value using key?
In PHP, you can use the $array[$key] syntax to get the value stored at a particular key in an array.
How to Flatten a Multidimensional Array?
You can use array_walk_recursive() function in PHP to flatten a multidimensional array.