print_r() function is used to print an array in PHP. In the parameter of print_r() function pass array which you want to be printed. Table of Contents 1. Print an array2. Print values by indexing number3. Print array’s all value by loop If you are trying to print an array by using echo then definitely … Read more
strlen() function is used to count the length of a string in PHP. You have to pass the variable name in which you have stored the string in strlen() method’s parameter or string in a double quote in strlen().
PHP gives us a function sizeOf() to count the length of the data stored in an array. sizeOf() is written in camel case. In sizeOf() method’s parameter, pass the array, you want to count the length of. and after that, simply print it by an echo. See the below example: Output:- 5
When we want to display data in ascending or descending order, we use SORT BY in the SQL query. Use the ASC keyword for ascending order and DESC for descending order. The data display order may be ascending & descending. The SQL query for sorting data Give column name after ORDER BY for sorting data … Read more
Select query in the SQL (structured query language) is used to display data from the table. Query – SELECT * FROM table; Bypassing conditions with this query, we can display data accordingly, we want to see or of a particular column. SQL “SELECT” query syntax Example table- Select all columns (*) of the table To … Read more
Today, we are going to learn how to add a column in a table using SQL (structured query language). The query you will learn here is ALTER TABLE table ADD COLUMN column INT(10). After the column name, you need to define its data type. You may define it according to your needs. If you store … Read more
In this guide, you are going to know how to empty a table in SQL or delete all the data from a table with the help of the DELETE FROM table query. So, the query you need to know to perform this task is:- The SQL query to delete all data from a table use … Read more