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);
}
LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a few issues:Here is the project. Create a lovely polynomial calculator, that takes the equation from
trim function issues
Hi guys, total noob here... So I've been tinkering around with a html and am using php to email the subitted data to me. It's all working fine, except now I've changed the rules of the form a little
FILTER_CALLBACK -- Files?
Hi All,I'm using the php filter functions to validate my form data. For custom filters, I'm using the FILTER_CALLBACK filter but when I'm using files, this never seems to be called? It may be that the
Need understanding of this bit of code
Code: <?php // WHERE clause filters $arrSQLFilters = array(); // whether or not zip codes table needs to be included $boolIncludeZipCodes = false; // Zipcode filter
Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But, I am unsure on how to prevent against mysql injections without using mysql_real_escape_string since
returning data from an ssh2_exec()
here's what i got.$conn = ssh2_connect($this->_host); ssh2_auth_password($conn,$this->_user,$this->_pass)or die("Cannot Connect"); //build command line to include
Array to string conversion
Can anyone help me with this?Notice: Array to string conversion in /home/..../index.php on line 360Whatever this is, it's causing the script to fail at uploading.Code (starting just before line
Phase Error I can't seem to find :(`
Hey guys, I can seem to find my phase error on this. I am getting this error[error]Parse error: syntax error, unexpected $end in /home/klrbal/public_html/Mafia-test/tempfam.php on line
Preventing SQL Injection
I have a question about SQL Injection, In some of our code we use this:
Count on multidimensional array
Hi, i got an array as below:Array( => Array ( [2009-12-08] => 1 ) [1] => Array ( [2009-12-07] => 1 ) [2]