<?php
$addfrontchar = substr($title,0,3);
$addfrontchar = strtoupper($addfrontchar);
$chars =
array("A","B","C","D","E","F","G","H","I","J","K","L","M","N",
"O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3",
"4","5","6","7","8","9","0");
$max_chars = count($chars) - 1;
srand((double)microtime()*1000000);
for($i = 0; $i < 8; $i++)
{
$randnum = ($i == 0) ? $chars[rand(0,
$max_chars)] : $randnum . $chars[rand(0, $max_chars)];
}
$addcatid = $cat_id;
$createprodnum = $addfrontchar . $randnum .
$addcatid;
echo $createprodnum;
?>
Görüntüleme: 268