Re: NEWBIE QUESTION

From: Date: Thu, 01 Feb 2001 16:04:59 +0000
Subject: Re: NEWBIE QUESTION
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37646@lists.php.net to get a copy of this message
Hi, first of all being desperate for help is okay but please don't write in cabs. try this: while ($row = mysql_fetch_array($result) ) { echo "<a href=http://tias.kub.nl/programs/$row[opleiding_afkorting]/ $row[leergang_afkorting/ virtuele.klas/programma/blok$row[module_nummer/$row[leergang_afkorting]_blok 0 $orw[module_nummer].html>$row[module_nummer]</a><br>"; } this lists the links. If "blok0" should increment you'll need to put something like $i = 0 before the while loop and $i++ after the "echo" good luck Johannes "Stinie Steinbach" <s695645@kub.nl> schrieb im Newsbeitrag news:3A7970DB.CD81B174@kub.nl... > DOES ANYONE KNOW WHAT'S WRONG WITH THIS CODE > IK WANT TO GENERATE A CODE THAT SELECTS A COUPELE OF PARAMETERS FROM TWO > TABLES IN A MYSQL DATABASE... > THE QUERY THAT I USE WORKS CORRECTLY BUT I HAVE A PROBLEM WITH THE LINKS > I WANT TO GENERATE WITH PHP... > I NEED TO CREATE AN ARRAY OF LINKS THAT LOOK LIKE THIS... > > BLOK 0 | BLOK 1 | BLOK 2 | BLOK 3 | BLOK 4 | BLOK 5 | BLOK 6 | BLOK 7 | > BLOK 8 | BLOK 9 > > PLEASE HELP!!! > > <? include("connect.php3") ?> > <? > $result = mysql_query ("select m.module_id, m.leergang_afkorting, > m.module_nummer, l.opleiding_afkorting > from module m, leergang l where m.leergang_afkorting = > l.leergang_afkorting > and m.leergang_afkorting = 'EDP16' order by m.module_nummer"); > while (list > ($module_id,$leergang_afkorting,$module_nummer,$opleiding_afkorting) = > mysql_fetch_row ($result)) { > echo "<a > href=\"http://tias.kub.nl/programs/\"opleiding_afkorting=$opleiding_afkortin g\"/ > > \"leergang_afkorting=$leergang_afkorting\"/ > \"virtuele.klas/programma/blok\"module_nummer=$module_nummer\"/\"leergang_af korting=$leergang_afkorting\"_blok0\" > > module_nummer=$module_nummer.html\">$module_nummer</a> > } > ?> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#37646) next »