How-to articles, tricks, and solutions about PHP
String comparison using '==' or '===' vs. 'strcmp()'
In PHP, you can use either the == or === operator to compare two strings.
Submit html table data with via form (post)
Here is an example of how to submit an HTML table data via a form (using the POST method) using PHP:
syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
TCPDF Save file to folder?
To save a file generated by TCPDF to a specific folder, you can use the TCPDF "Output" function.
The openssl extension is required for SSL/TLS protection
The openssl extension in PHP is required to provide SSL/TLS support.
Title case a string containing one or more last names while handling names with apostrophes
In PHP, you can use the ucwords() function to convert a string to title case.
Truncate a string to first n characters of a string and add three dots if any characters are removed
Truncate string in Laravel blade templates
To truncate a string in a Laravel blade template, you can use the str_limit function.