Actually I am very new to PHP.
My code goes here:
<?php
$mysql = mysql_connect('localhost','Susi','susi');
mysql_select_db('mydb', $mysql);
$rs = mysql_query("show tables;");
$nonTable = array('table_1','table_2');
while ($tabs = mysql_fetch_assoc($rs)) {
foreach ($tabs as $tables) {
echo $tables.'<br />';
}
}
?>
In this case $rs stores the entire table of the database “mydb” .
There is another array $nontable which contains some tables which are already in Table list of “mydb” database.
I want to pass those table names to the while loop excluding the tables in “$nontable” array.
I tried
array_diff($rs,$nontable)
but it provided NULL result.
I will be very happy if somebody helps me out…
Thanks in advance…
Do you mean: