Jump to content

[SOLVED] Horizontal repeat regions


Zergman

Recommended Posts

I can't seem to figure out how to repeat my data horizontally instead of vertically.

 

I tried searching google, but most of the results are for a dreamweaver extension to do it.  Can't find out how to do it by hand.

 

Here is my query.  Pardon my newbish skills, still learning :)

<?php

mysql_select_db($database_cntrackanator, $cntrackanator);
$query_rssql = "SELECT * FROM templates_categories WHERE uname = '$username' ORDER BY category_name";
$rssql = mysql_query($query_rssql, $cntrackanator) or die(mysql_error());
$row_rssql = mysql_fetch_assoc($rssql);
$totalRows_rssql = mysql_num_rows($rssql);
    echo $row_rssql['category_name'];

?>

 

So how can I get this to loop vertically instead of down?

Link to comment
https://forums.phpfreaks.com/topic/141986-solved-horizontal-repeat-regions/
Share on other sites

k, that is pretty wicked, im really going to have to read up on this more.

 

One last thing that will solve this issue.

 

I want to make the output link to the same variable name as whats shown.

 

This is what I have so far but not doing something right here.

<?php

mysql_select_db($database_cntrackanator, $cntrackanator);
$query_rssql = "SELECT * FROM templates_categories WHERE uname = '$username' ORDER BY category_name";
$rssql = mysql_query($query_rssql, $cntrackanator) or die(mysql_error());
$row_rssql = mysql_fetch_assoc($rssql);
$totalRows_rssql = mysql_num_rows($rssql);
while($row_rssql = mysql_fetch_assoc($rssql))
echo '<div class="cat_name">[<a href="">',$row_rssql['category_name'],"</a>]</div>\n ";

?>

 

I want to use the same $row_rssql['category_name'] in the hyperlink but can't get the proper syntax right.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.