“Unknown collation: ‘utf8mb4_unicode_ci’”. This issues occurs if you’re attempting to migrate from MySQL version 5.5.3+ to an older database. The utf8mb4 is new encoding type was introduced in MySQL version 5.5.3. In older version of MySQL, the character set named utf8 that uses a maximum of three bytes per character and contains only BMP characters, whereas utf8mb4 are stored as 4 bytes, thus allowing for compliance with more Unicode characters. […]
Add the custom shortcodes in theme’s file ( functions.php) for visual composer. WordPress getting one of the user friendly CMS with admin controls which allows the users to make changes to their site. WordPress functions to make this acquaintance even better. Using vc_map() function you can easily create custom shortcodes. vc_map() function should be called with an array of special attributes describing your shortcode. vc_map functions accept an array with […]
To print even and odd numbers we can use different types of method. Method:1 Even numbers between 1 to 100 In first method we use ‘for’ loops to print even numbers between 1 to 100. Here loop starts from number 2 and after every count its value increment by 2 for print even numbers. Odd numbers between 1 to 100 In first method we use ‘for’ loops to print odd […]
To upload zip file directly from URL to cPanel using PHP, follow these steps: 1. Create a new file php at root folder named getzip.php, where we can access on our domain. Eg:- ../public_html/getzip.php 2. Next edit the getzip.php file in the file manager, and put below code: 3. Now open the file in the browser, so it might be http://domain.com/getzip.php 4. We should wait now, no worry if 500 […]
We can print a star pyramid pattern in php along with there row number using ‘for’ loops. To print this pattren we will use a ‘for’ loop to print rows. The first ‘for’ loop will indicate the number of rows. Then we use ‘if’ condition to check the even & odd values. We will print number value first in odd number and then stars and vise versa we will print […]
We can print this pattern in php. For this we need Variables and ‘for’ loops. First we have Variables in which Symbols are passing as a string to print pattern. First ‘for’ loop is used for number of row and second & third ‘for’ loop is used for numbers in a row. ‘if’ condition is used to print empty space and ‘elseif’ condition used to print symbol.
We can print a numeric pyramid series and also can print the sum of every row using php code. We need two ‘for’ loops to print this pattern in php. First ‘for’ loop is used for rows and second ‘for’ loop is used for numbers in a row. We use ‘if’ conditions to add a ‘+’ sign between the numbers also some variables to store the sum of a row.
is_numeric() The is_numeric function used to check that the value of a variable is a number or not. Syntax: is_numeric(var_name) Output: Value is a number number_format() The number_format function used to format a number with in a groups of thousands. Syntax: implode(number,decimals,decimalpoint,separator) (Number is required, other parameters are optional) Output: 5,000,000 5,000,000.000 5*000*000/000 range() The range function used to create an array with containing the values with in the range. […]
implode() The implode function used to concatenate the array elements as a string with a separator. Syntax: implode(separator, array) Output: Apple,Boy,Cat,Dog explode() This function is vise versa of the implode function. In this function the string is split in to array elements. It breaks a text in to smaller text. Syntax: explode(separator, string, limit) Output: Array (  => I have Car  => I have Bike  => I […]
We can print this pattern in php. In this pattern we divide our program in two parts. In first part we are using two ‘for’ loop to make the above decreasing triangle. The first ‘for’ loop decides the rows and the second ‘for’ loop decides the number of objects in every row. As like above we use same two ‘for’ loops to make lower increasing triangle.