Thanks everybody for all your help.
It goes now.
""YoBro"" <[EMAIL PROTECTED]> wrote in message
news:99oh2o$f95$[EMAIL PROTECTED]...
: I can't figure out why this doesn't work. Rather than echo $myrow[0] which
: works, I want to use the feild name. Like $myrow[make] to make reading the
: code easier. IS this possible?
:
: Here is some code:
:
: $db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
: database");
:
: mysql_select_db("database",$db) OR DIE("Unable to connect to database");
:
: $result = mysql_query("SELECT * FROM stock",$db);
:
: while ($myrow = mysql_fetch_row($result))
: {
: echo "$myrow[id]<br>"; //Usually $myrow[0] etc
: echo "$myrow[make]<br>";
: echo "$myrow[model]<br>";
: echo "$myrow[sub_model]<br>";
: }
:
: Thanks Heaps
:
:
: --
: Regards,
:
:
: YoBro
: -------------------------------------------------------------
: DO NOT REPLY TO THIS VIA EMAIL
: PLEASE USE THE NEWSGROUP
: All emails sent to this address are automatically deleted.
: This is to avoid SPAM!
: -------------------------------------------------------------
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
: To contact the list administrators, e-mail: [EMAIL PROTECTED]
:
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]