Hi,
I want to know your comments about the code below, which open a text file called hekma.txt. Then, count the number of lines. Then, select a line. Finally, it echo the line. The is:
<?php
// All hekmas must be written to hekma.txt
//Calcultae the no. of lines
$hekmaline = file("hekma.txt");
$hekmano = count($hekmaline);
echo $hekmano;
//Generate random no.
mt_srand(time());
$id = mt_rand(0, $hekmano);
$id = intval ($id);
//Selecting The line
echo $hekmaline[$id];
?>
So, can you give me your comments?