Re: Need some help folks....
| From: | Dallas Kropka | Date: | Wed, 29 Nov 2000 13:48:37 +0000 |
| Subject: | Re: Need some help folks.... | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27702@lists.php.net to get a copy of this message | ||
Thanks, to all who wrote to help.... In the end it was Joe Stump who did the
most good.
Just so you know there Michael... A 2D array wont work with the rest of the
code... but this is how I got it....
function display_cat()
{
$section;
for($j=1 ; $j< count($this->cat_arr); $j++)
{
echo"<tr>";
for ($i=1 ; $i<3 ; $i++)
{
list($key, $value) = each($this->cat_arr);
$foo = explode('_',$key);
if($foo[0] != $section)
{
$section = $foo[0];
switch($section)
{
case "online":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\" size=\"5\">Onlne
Business<HR></font></td></tr><tr>";
break;
case "rent":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\" size=\"5\">Rental
Stores<HR></font></td></tr><tr>";
break;
case "retail":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\" size=\"5\">Retail
Stores<HR></font></td></tr><tr>";
break;
case "food":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\" size=\"5\">Food
Industry<HR></font></td></tr><tr>";
break;
case "serv":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\" size=\"5\">Service
Industry<HR></font></td></tr><tr>";
break;
case "man":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\"
size=\"5\">Manufacturing<HR></font></td></tr><tr>";
break;
case "fin":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\" size=\"5\">Financial
Services<HR></font></td></tr><tr>";
break;
case "trans":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\"
size=\"5\">Transportation<HR></font></td></tr><tr>";
break;
case "other":
echo "</tr><tr><td colspan =2><BR><font face=\"Arial,
Helvetica,
sans-serif\" color=\"#003366\" size=\"5\">Other
Categories<HR></font></td></tr><tr>";
break;
default:
break;
}
}
$link = "combo.php3?category=".$key;
echo("<td><a href=\"$link\" ><font face=\"Arial\"
color=\"#003366\"
size=\"3\"> $value</font></a></td>");
}
echo"</tr>";
}
Its ugly in outlook, but it works great.
----- Original Message -----
From: "Michael Dearman" <mdearman@inficad.com>
To: "Dallas Kropka" <dallask@firstworld.net>
Cc: "PHP LIST" <php-general@lists.php.net>
Sent: Tuesday, November 28, 2000 4:12 PM
Subject: Re: [PHP] Need some help folks....
>
>
> Dallas Kropka wrote:
> >
> > Thanks for the quick response Joe, but there is a problem with this....
each
> > key is different in regards to the latter half of the key.... here is
the
> > whole array.....
> >
>
> Would arranging it into a 2d array help?
>
> $cat_arr= array( "online" => array ("online" => "Online
> Business "),
> "rent" => array ("auto" =>"Automobile /
> Boat
Rentals ",
> "construction" =>"Construction
Equipment",
> etc),
> "retail" => array ("antique"
> =>"Antique",
> "appliance" =>"Appliance",
> etc),
>
> Mike D.
>
> --
> 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
>
>