PHP MYSQL : now I am fed-up with the same warning
<p>I tried every thing in below code but I am not at all able to arrange resulted table in ascending order.
This time I am getting the table but not in arranged order and also two warnings.
My code is as follows:</p>

<pre><code>     &lt;?PHP 

         require_once("lib/connection.php"); 
         $array = array();
         $result = mysql_query("SHOW TABLES FROM st_db_1");
         while($row = mysql_fetch_row($result) ){
         $result_tb = mysql_query("SELECT id FROM $row[0] LIMIT 1");
         $row_tb=mysql_fetch_array($result_tb);
         $array = $row[0];

        echo "{$row[0]}&lt;br/&gt;" ;
         }
    sort($array);
    foreach ($array as $item) {
        echo $item;
    }
   ?&gt;
</code></pre>

<p>And the output I am getting is below :</p>

<pre><code> class_1
 class_10
 class_11
 class_12
 class_2
 class_3
 class_4
 class_5
 class_6
 class_7
 class_8
 class_9

  ( ! ) Warning: sort() expects parameter 1 to be array, string given in C:\wamp\www\Copy (4) of st_db_1\test_2.php on line 15
</code></pre>

<p>Call Stack</p>

<pre><code>  ( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp\www\Copy (4) of      st_db_1\test_2.php on line 1 call Stack
</code></pre>

<p>But I want output in the below mentioned order:</p>

<pre><code> class_1
 class_2
 class_3
 class_4
 class_5
 class_6
 class_7
 class_8
 class_9
 class_10
 class_11
 class_12
</code></pre>

<p>Please help.</p>
