Dd you even read the link I posted?
PHP handles single and double quotes differently. Anything inside of single quotes is treated as literal text. Anything inside of double quotes is evaluated as a valid PHP expression, especailly variable names. e.g.
$table='blah';
$str = '$table is $table';
echo $str;
will produce the following output:
$table is $table
However, because the following strings are in double quotes, PHP will attempt replace the variable names with the value of the variable:
$table='blah';
$str = "$table is $table";
echo "Table is $table<br>$str";
Table is blah
blah is blah
In your expression
$delete = '<a href="?mode=delete&table=$table&main_id='.$row['Product_Number'].'">Delete</a>';
the '$table' is inside the single quotes. This means that PHP treats the string '$table' as literal text. You want to put this in double quotes rather than single quotes.
Now, I'm betting you're thinking "but how do I put the double quote in the output text? PHP keep sending my string." Again, read the link I posted. Escape characters using a '\' character.