Search
 
SCRIPT & CODE EXAMPLE
 

PHP

random number generator in php

you can use rand() function for that in php.
Example:
Generate random numbers between 1 to 50
<?php
  echo rand(1,50);
?>
Comment

php random name

    public static function generateRandomString($length = 6): string
    {
        $original_string = array_merge(range(0, 29), range('a', 'z'), range('A', 'Z'));
        $original_string = implode("", $original_string);
        return substr(str_shuffle($original_string), 0, $length);
    }
Comment

php random

mt_rand(1000, 9999)
Comment

PREVIOUS NEXT
Code Example
Php :: laravel add item to array 
Php :: php ziparchive compress folder 
Php :: wordpress check if page is password protected 
Php :: change woocommerce return to shop link 
Php :: fetch row in php 
Php :: laravel where like 
Php :: how to show validation error in laravel 8 
Php :: factory laravel tinker 
Php :: set default value for column in laravel model 
Php :: php get all php files in a directory 
Php :: php create url with query sting from array 
Php :: Format and show date PHP 
Php :: php array all keys empty 
Php :: if browser url is having query string after domain name in it check using php 
Php :: php get bearer token from request 
Php :: php exercises and solutions 
Php :: how to get only decimal value in php 
Php :: array_last in laravel 8 
Php :: select sql in php 
Php :: how to know the path of php in linux 
Php :: phpoffice create excel and download 
Php :: wordpress get permalink taxonomy id 
Php :: convert multidimensional array to single array php 
Php :: How to call soap api in php using curl method 
Php :: yyyymmdd to yyyy-mm-dd php 
Php :: E: Unable to locate package php8.0 
Php :: Flutter migrate to Android Studio 
Php :: wordpress programmatically logout 
Php :: yii2 activeform 
Php :: php check if headers already sent 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =