Randhex Php

[Solved] Randhex Php | Php - Code Explorer | yomemimo.com
Question : php rand int

Answered by : ghislain-fievet

random_int ( int $min , int $max );

Source : | Last Update : Sun, 24 May 20

Question : randhex php

Answered by : ivn-javier-londoo-rueda

function random_part() { return str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT);
}
function randomHEX($amount) { $_result = ""; for ($i = 0 ; $i < $amount; $i++) { $_result .= random_part(); } return $_result;
}
//to get a 16 HEX number
echo randomHEX(8);

Source : | Last Update : Tue, 17 Nov 20

Answers related to randhex php

Code Explorer Popular Question For Php