The time now is 12am in Malaysia – I’m working so I need to sleep – but I will continue doing it later, I will conceder this as my mini project, though the function might be really slow, I hope I can make a totally non characterized function so any computer with even no Arabic capabilities to produce the picture, I would like you to help me out also.. Though it might be one of our useless functions ever but come on servers nowadays could do this in less than 1 second not to mention that PHP is that fast... Anyway this is what I have so far.
كود PHP:
<?
$if_not_doubles = array(1,2,3,4,6,8,14,15,16,17,33,34,36,37,38,39);
$letters_in_arabic = array ('Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï',
'Ð','Ñ','Ò','Ó','Ô','Õ','Ö','Ø','Ù','Ú','Û','Ý','Þ','ß',
'á','ã','ä','å','æ','ì','í','ÂÂ','ÃÃ','ÅÅ','ÇÇ');
$start_number = '65153';
function doubles($start_number){
$pluse = $start_number;
$temp = array($start_number,++$pluse,$start_number,$pluse);
$start_number = ++$pluse;
return $temp;
}
function normal($start_number){
$temp = array($start_number,++$start_number,++$start_number,++$start_number);
++$start_number;
return $temp;
}
$y = 0;
$count = 1;
//$count2 = 0;
$temp = array();
while(each($letters_in_arabic)){
if($if_not_doubles[$y] <> $count++) {
array_push( $temp, normal(&$start_number) );
}
else {
array_push( $temp, doubles(&$start_number)); $y++;
}
}
print_r($temp);
?>