פורסם 2011 ביוני 2314 שנים בבסיס נתונים יש טבלה| Intel | 478 | P4 || AMD | 754 | AXP Mobile |וקובץ php שאמור להוציא אותה (כולה) באתר<?phpif (!mysql_select_db('TEST4')) die("Can't select database TEST4");echo ("<table><tr><td>manufacturer</td><td>socket</td><td>cpu</td></tr>") ;$result = mysql_query("SELECT * FROM TBL_HARDWARE");while($row = mysql_fetch_array($result)){echo ("<tr>") ;foreach ($row as $cell){echo ("<td>".$cell."</td>") ;}echo ("</tr>") ;}echo ("</table>") ;?>הקובץ שהגולש באתר רואה נראה כך| manufacturer | socket | cpu || Intel | Intel | 478 | 478 | P4 | P4 || AMD | AMD | 754 | 754 | AXP Mobile | AXP Mobile |ניסיתי להוסיף בדיקה מאיפה זה מגיע...$i = 0 ;...echo ("<td>".$i++.$cell."</td>") ;...תוצאה | manufacturer | socket | cpu || 0Intel | 1Intel | 2478 | 3478 | 4P4 | 5P4 || 6AMD | 7AMD | 8754 | 9754 | 10AXP Mobile | 11AXP Mobile |
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.