Hi,

>         while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
>
>                 echo "<TR WIDTH=150><TD
> ALIGN=left>".$line['name']."</TD><TD
> ALIGN=right>".$line['$wk']."</TD>";
>
>         }

Here is your problem. Your are indeed substituting $wk into the query
correctly, but when you go to output the result rows you are not.

You should simply remove the quote marks from:

$line['$wk']

so that it is:

$line[$wk]

PHP does not interpret variable names in single-quoted strings - only in
double-quoted strings. With your current code, PHP is only looking for an
array element called '$wk', which doesn't exist!

In future, may I suggest you that post questions like this to the PHP
mailing list, as this is nothing to do with MySQL.

Regards,

Basil Hussain
---------------------------------------
Internet Developer, Kodak Weddings
E-Mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to