السلام عليكم
اخواني الاساتذه ارجو المساعده
ارفق لكم كود يقراء بيانات من ملف bbf.txt من الاعلى الى الاسفل المطلوب العكس يقراء البيانات من الاسفل الى الاعلى
بحيث اذا تم اضافة شخص يكون هو الاول وجزاكم الله خير
كود PHP:
<html dir = 'rtl'>
<head>
<meta http-equiv="Content-Language" content="text/html; charset = Windows-1256">
<title>بيانات الشخص</title>
</head>
<body>
<div align="center">
<table border="1" width="30%" id="table1">
<tr>
<td bgcolor="#999966" align="center">الاســــــــــــم</td>
<td bgcolor="#999966" align="center">رقم الهاتف</td>
</tr>
<?php
$file = file("bbf.txt");
for($i = 0; $i < count($file); $i++){
$read = explode("||" ,$file[$i]);
$name = $read[0];
$number = $read[1];
?>
<tr>
<td bgcolor="#FFFFFF"><?php echo $name ?></td>
<td bgcolor="#FFFFFF"><?php echo $number ?></td>
</tr>
<?php
}
?>
</table>
</div>
</body>
</html>