OPTIMIZE command is use for optimize a table. OPTIMIZE TABLE `users`  

Last updated 7 years, 9 months ago | 2619 views

Tags:- SQL

PHP |  date() function By using the PHP date() function we can find the current date and time. <?php echo date(“d-m-Y”); //This will print today date. echo date (“d-m-Y h:i:s”) // This will print today’s date …

Last updated 7 years, 2 months ago | 2617 views

Tags:- PHP

PHP | What is difference between == and === operator? "==" and "===" The two operators are known as comparison operators. "==" (i.e. equal)  and === (i.e. identical) both are use to check values are …

Last updated 7 years, 2 months ago | 2614 views

Tags:- PHP

MySQL | What is the best collation to use for MySQL? Mostly we use: utf8_general_ci utf8_unicode_ci utf8_general_ci is used for fast sorting but it is less accurate whereas utf8_unicode_ci is used for better accuracy but …

Last updated 7 years, 9 months ago | 2612 views

Tags:- MySQL

PHP | How to convert a string to an array? string to array There is a function in PHP called explode() which is used to convert any string to an array.    <?php $str = …

Last updated 7 years, 2 months ago | 2604 views

Tags:- PHP

PHP | The maximum size of a file that can be uploaded using PHP The default maximum size of a file that can be uploaded using PHP is 2MB. upload_max_filesize = 2M; and we can …

Last updated 7 years, 9 months ago | 2603 views

Tags:- PHP

PHP | Length of a string There is a string function called strlen() which is used to find the length of a string. It accepts a string that returns the length of the given string.  …

Last updated 7 years, 2 months ago | 2602 views

Tags:- PHP

PHP | What are default session times in PHP? By default, session variables last until the user closes the browser or leaves the site otherwise most of the server terminates the session variable if you …

Last updated 7 years, 9 months ago | 2600 views

Tags:- PHP

PHP | header() function By sending the headers bellow, we change the browser’s default cache settings. We can override any of those settings and force the browser to not cache. In this code we just …

Last updated 7 years, 9 months ago | 2593 views

Tags:- PHP

PHP | Statement $x = 3 + "15%" + "$25"? The correct answer is 18. Here’s why: PHP is a  loosely typed language, therefore it does automatic type conversion based on the context in which …

Last updated 6 years, 9 months ago | 2591 views

Tags:- PHP

PHP | require() and require_once() Both require() and require_once() is use to include a file but the difference is required_once() function checks if the file already included or not where  require() function does not check. …

Last updated 7 years, 2 months ago | 2583 views

Tags:- PHP

PHP | What are data types in PHP? Variables can store data of different types, and different data types can do different things. PHP supports the following data types: String Integer Float (floating-point numbers - …

Last updated 7 years, 2 months ago | 2583 views

Tags:- PHP

PHP | Array error fix | array_merge() The output will be as follows: array(2) { [0]=> int(1) [1]=> int(2) } NULL NULL It will also generate two warning messages as follows: Warning: array_merge(): Argument #2 …

Last updated 6 years, 9 months ago | 2583 views

Tags:- PHP

MySQL | Find the number of rows in a table We can use the below query to count the number of rows in a table >SELECT COUNT(*) FROM table_name;  

Last updated 7 years, 9 months ago | 2578 views

Tags:- MySQL

Chart.js | Add bar chart in the webpage This is a simple example of using Chart.js to create a bar chart on the webpage.  Step 1: Create a basic HTML file called "chart.html"  <!DOCTYPE html> …

Last updated 6 years, 5 months ago | 2576 views

Tags:- HTML JQuery JavaScript Chart