1foreach($array as $item) {
2 echo $item['filename'];
3 echo $item['filepath'];
4
5 // to know what's in $item
6 echo '<pre>'; var_dump($item);
7}
1foreach ($array as $element) {
2 echo "<a href='show_cls_db.php?id=" . implode('', $array2) . "'>{$element}</a><br/>";
3}
1 $array = array();
2 $result = mysql_query("SHOW TABLES FROM `st_db_1`");
3 while($row = mysql_fetch_row($result) ){
4 $result_tb = mysql_query("SELECT id FROM $row[0] LIMIT 1");
5 $row_tb=mysql_fetch_array($result_tb);
6 $array[] = $row[0];
7 $array2[] = $row_tb[0];
8 //checking for availbility of result_tb
9 /* if (!$result_tb) {
10 echo "DB Error, could not list tablesn";
11 echo 'MySQL Error: ' . mysql_error();
12 exit;
13 } */
14 }
15 natsort($array);
16 natsort($array2);
17
18 foreach ($array as $item[0] ) {
19 echo "<a href=show_cls_db.php?id= foreach ($array2 as $item2[0]){echo \"$item2[0]\"}>{$item[0]}<br/><a/>" ;
20 }