I want to use same randomly generated value in header.php and footer.php in wordpress. i have try this function to randomly generated value:
function randValue() {
$randCheaters = substr(md5(microtime()),rand(0,26),5);
return $randCheaters;
}
In header.php i use some thing like this
<header id="<? echo randValue(); ?>">
and in footer.php i have used this
<footer id="<? echo randValue(); ?>">
The problem is it generate different value in footer and header, how can i get the same value in both place.
Aucun commentaire:
Enregistrer un commentaire