Jump to content

Stuck - Newbie to PHP. Stuck at the Basics.


wildata

Recommended Posts

Hi Folks,

Trying to create a dropdown (Select Box) from Columns (Field's) in one row of a Table.

Connecting to DB fine.

A Numeric Array gives me a "Correct" result" 7  Fields from the "row".

 

An Associative Array only gives me the first 2 results, What am I doing wrong ?

 

Help appreciated, file lw.php attached.

 

Help much appreciated.

 

C.

 

 

 

 

 

lw.php

Link to comment
Share on other sites

So you only have two values printed from ...

printf ("%s(%s)\n",$row["ProductCode"],$row["L1"],$row["L2"],$row["L3"],$row["L4"],$row["L5"],$row["L6"]);

the %s indicates that the value of a string should be included (from the parameters), so have you tried adding more %s's to print out all of the values?

 

If in doubt - use something like print_r() which outputs a variable with all of it's components in a readable format.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.