PHP provides a function – rand() to generate the numbers randomly from one number to another number (ex:- 0 to 90). rand() function has two parameters. The first parameter is for min number & the second is for max number. You get a random number from min to max in PHP. Separate parameter by comma … Read more
We make use of implode() method/function in PHP to change the array into a string. implode() function has a parameter to pass the array in it that you want to be converted into a string. This method will joint all the values of array from different-different indexing numbers and then displayed as a single string. … Read more
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