Skip to content

Instantly share code, notes, and snippets.

View hasanfardous's full-sized avatar
💭
Let's code

Md Hasan Fardous hasanfardous

💭
Let's code
View GitHub Profile
@hasanfardous
hasanfardous / generate-unique-string.php
Last active September 3, 2024 06:50
Generate unique string each time by PHP
<?php
function generate_unique_string( $quantity ) {
$arr = [];
for( $i = 1; $i <= $quantity; $i++ ) {
$arr[] = sprintf('%08x', mt_rand(0, 0xFFFFFFFF));
}
return $arr;
Root url for website
---------------------------------------------------------
<?php site_url(); ?>
<?php bloginfo('url'); ?>
title of specific post/page
---------------------------------------------------------
<?php wp_title(); ?>
Title of site