how to turn a list of websites per category into a multi column list?

Discussion in 'PHP' started by 123GoToAndPlay, Feb 20, 2010.

  1. #1
    still stuck with this what seems to be simple.

    I have stored a bunch of websiteslinks per category and i want them to be displayed over x columns and the category section to be displayed once.

    this should make a list over 1 column.
    
    $category = '';
    foreach ($links as $link){
    $catName = $link['linkCat'];
    $linkName = $link['linkTitle'];
    $linkURL = $link['linkHREF'];
    	if ($catName != $category) {
    	//show heading
    	$category = $catName;
    	$msg .= "<div class=\"category\">";
    	$msg .= "<strong>".ucfirst($category['name'])."</strong>";
    	$msg .= "<br />";
    	$msg .= "</div>";
    	}//end heading
    $msg .= $linkName;
    $msg .= '<br />';
    }
    
    PHP:
    any suggestion
     
    123GoToAndPlay, Feb 20, 2010 IP
  2. 123GoToAndPlay

    123GoToAndPlay Peon

    Messages:
    669
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    123GoToAndPlay, Feb 20, 2010 IP