This Forum Has Been Archived
*Click Here To Visit The NEW Forum*

 

 


Looping in a switch

Designing your own website? Need help? Ask your questions and share your favorite resources here... Tables, Forms, Color Scheme & Layout, Scripts, Programs & Resources

Moderators: angienewton, tknoppe, terrapin719, lisamariemary

Looping in a switch

Postby ranga227 » Fri Jun 19, 2009 10:37 am

Code: Select all
$query_links = "select link_name, link_page from admin_links";
    $mysql_links = mysql_query($query_links) or die(mysql_error());
    switch($page) {
        while ($fetch_links = mysql_fetch_array($mysql_links)) {
            case "$fetch_links[\"link_name]\"]":
                require_once("$fetch_links[\"link_page\"]");
                break;
        }
    }


Basically I had this idea this morning. So I thought I would give it a shot.

And it doesn't seem to run(big surprise) the switch doesn't like the loop inside of it.

Any thoughts of how to get this to work though?
ranga227
 
Posts: 3
Joined: Mon Jun 15, 2009 10:52 am

Return to HTML, Web Design & Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron