Definition-list nesting problem

This is a discussion on Definition-list nesting problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hello New poster to the group and a n00b to mySQL and PHP of a couple of weeks. Built an ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 3 Weeks Ago
Baldylocks-Ubuntu
 
Posts: n/a
Default Definition-list nesting problem

Hello

New poster to the group and a n00b to mySQL and PHP of a couple of weeks.

Built an Ubuntu server 2 weeks ago to fit in with my conversion of all the
pcs in the house to Linux. Have got MySQL and PHP running fine and got
stuck in converting my old Access dbs. So far am pleased with the results
in the time

I swore I wouldn't keep asking n00b questions in NGs and forums and would
figure things out, but this one is driving me insane.

Got my search page to produce a numbered list of clickable links, those
links then open a page with more details from that record - that works
fine. I am now trying to get the format of the details page right (the easy
bit I thought!)

I know I am missing something really basic and stupid and it is just a
problem with my nesting somewhere but I would really appreciate a pointer
please.

I am trying to produce a definition-list using the field name as the
definition-list term and the field content as the the definition-list
definition.

I can get a list of terms, or a list of definitions after a lot of trial and
error, I am now at the stage where I have both... but I have the terms as
one list and the definitions as another list below.

Here's the code:
//////////////////////////////////////////
// Printing results in definition list
echo "<dl>";
while ($headers = mysql_fetch_field($result)){
Â* Â* Â* Â* echo "<dt><h4>" . $headers->name . "</h4></dt>";
}
Â* Â* Â* Â* while ($entry = mysql_fetch_array($result, MYSQL_ASSOC)){
Â* Â* Â* Â* Â* Â* Â* Â* foreach ($entry as $col_value){
Â* Â* Â* Â* Â* Â* Â* Â* Â* Â* Â* Â* echo "<dd>$col_value</dd>";
Â* Â* Â* Â* }
}

echo "</dl>";
/////////////////////////////////////////

Any help/pointers gratefully received.

Cheers

David
--
Knowledge is of two kinds: we know a subject ourselves, or we know where we
can find information upon it. (Samuel Johnson)
Only the mediocre are always at their best. (Jean Giraudoux)
(Reply address genuine - Checked occasionally)
Reply With Quote
  #2 (permalink)  
Old 2 Weeks Ago
Baldylocks-Ubuntu
 
Posts: n/a
Default Re: Definition-list nesting problem

On Saturday 19 Apr 2008 18:06 Baldylocks-Ubuntu licked a pencil and jotted:

snip
>
> Any help/pointers gratefully received.
>
> Cheers
>
> David


N/m sorted it, thanks if anyone thought about it.

David
--
Knowledge is of two kinds: we know a subject ourselves, or we know where we
can find information upon it. (Samuel Johnson)
Only the mediocre are always at their best. (Jean Giraudoux)
(Reply address genuine - Checked occasionally)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:34 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0