hello all,
I currently have a list of products spit out from my db via a foreach loop. Right now I am styling these as a <li>
I want to style the list so that the annual and the monthly products are grouped together. This will probably mean using <div> instead of <li> and placing another loop inside the foreach to grab two products and put them in one div?
Any ideas how this might be structured??
should I use a for loop?
here is the current code:
Code: $productnames = '<center><table><tr><td><ul id="prodlist">'."n"; // list of products that can view this content
$show2all = false; // are one of the products the "all" flag?
$numcanview = 0; // the number of products that can view this post
foreach ($_product_id as $pid)
{
$pid = trim(strtolower($pid)); // make sure no extra spaces and not "ALL" or something
if ($pid=="all")
{
$show2all = true; // used later
} else {
$purl = $this->amprotectamroot.'member.php?price_group='.$allthepricegroups[$pid].'&product_id='.$pid;
$productnames .= '<li><a href="'.$purl.'">'.$alltheproducts[$pid].'</a></li>'."n";
$numcanview++;
}
Storing user data help?
Hey Guys, I'm not use if this question is to broad but I can always give you more information if needed.I have a website where users can login which uses mysql anyway I have a little form asking some
how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to make a new line before each * Also why does some characters come out all funky?Hers my code.. I dont
How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignored, rejected, or misunderstood in this forum. I'm surprised there isn't already any
Need some ideas as to how to go about sorting this array...
Here's how the array's are created..Code: <?phpwhile ($x = readdir($dp)) { $order[] = $p['order']; $files[] = $x;}?>Here's a sample of how they come out..Code: Array( [0]
Calling variables
I want to call this to my website but it doesn't display what I want it to,Code: <h5>Edit Subject: <?php echo $sel_subject['menu_name']; ?></h5>If I change
I need to increse 6hours more, and i don't know how???
I need to increse 6hours more, and i don't know how???<tr> <th>{ov_server_time}</th> <th
$_GET problem
Hi all,Have a bit of a problem with a little piece of code, I am not sure if this should be under php or ajax as I am not sure where the problem lies. Basically here is the script:Code:
How many users online in the last 24-hours using time()?
I'm fairly new to PHP. I have a MySQL table called 'users' and a field called 'loggedin' which is in time() format.I need a query that'll check how many players have logged in within the last
Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i would like to update a particular field in my db.however no matter how hard i try to the code seem to
Contact Form Not Working When I Add Validation Codes
So I built my first working PHP "Contact Us" like form. But, I have been trying to now make the form Validate for empty fields when the user hits the submit button. Problem is when I added