Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tiers.
I've got it working so it only displays a tier if the quantity is greater than 0 but I end up with a bunch of empty rows in between.
Instead of for example:
1 $20
2 $30
3 $40
I am getting
1 $20
2 $30
3 $40
How can I get it so the row is advanced only if something is output?
Code: for ($j=0; $j<12; $j++)
{
$data = Array();
if($pricearray[$j] > 0){
$data[0]['TEXT'] = $pricearray[$j];
$data[1]['TEXT'] = $_POST['select'];
$data[1]['TEXT'] .= " " . $pricedescriptionarray[$j];
$data[2]['TEXT'] = "Description";
$data[3]['TEXT'] = "20";
$data[4]['TEXT'] = "100";
}
$fsize += 0.5;
if ($fsize > 10) $fsize = 5;
$rgb_b -= 10;
$rgb_g -= 5;
$rgb_b -= 20;
if ($rgb_b < 150) $rgb_b = 255;
if ($rgb_g < 150) $rgb_g = 255;
if ($rgb_b < 150) $rgb_b = 255;
$pdf->tbDrawData($data);
}
bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error everytime. i even tried changing the port number(currently is 13 daytime) but doesnt work. please
How can you detect variable string in a massive string?
Ok guys, i need some help with this one.I am going to be getting a large string, like 10-20 paragraphs. I will also have an array or words that i would like to search it for.
Change Sort Order to Display Newest File First
Hi Guys,I have a page that sorts the contents (PDFs) of a directory and displays them on the webpage chronologically from the oldest (at top) to the newest (at bottom).I'd like to reverse this display
Memory Allocation
Hi folks,see this ex:int v=5;v=v+10;then what will do the compiler before the output come as 15.Please explain me technically.
How to update this array?
I am saving a string that looks this: username1, username2, username3...into a single cell in a database table. I am doing this so that when I retrieve that string using normal methods, I can turn it
Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it has to do with the several while loops that should be outputting the data. One more issue is that
I need an iframe that calls up a different page according to the date
hiI don't know any php (only html) and I urgently need to do the following: I need an iframe that calls up a different page according to the date e.g. on the 2th Dec a page called 'special2.php',
Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of the same email. I know I need to do an IF statement but I am kinda foggy on how to do the code.What I
Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter seems incredibly boring, daunting and complicated, it looks so awful that I haven't yet read it so I
SCRIPT ERROR
Here is the CONTACT FORM I made for our website:<form id="form1" name="form1" method="post" action=""> <table width="528"