PHP - Moved: Vertical-align='top' Ignored In Table
This topic has been moved to HTML Help.
http://www.phpfreaks.com/forums/index.php?topic=326428.0 Similar TutorialsI am trying to create something similar to a bar chart, using a html table based on the values stored in an array. However, I cannot seem to get the next column to begin after printing the number at the bottom. I can get it going horizontal, but I would like to create a vertical version. If anyone can provide me with help I would greatly appreciate it. Code: [Select] <?php $month = date("n"); //numeric representation of month (1-12) $year = date("Y"); //4 digit representation of year $day = date("d"); //numeric representation of the day of the month // constant variable to determine how many days alive according to the current date define('DAYS_ALIVE',(($year - 1902) * 365.24) + (($month - 1) * 30.5 )+ ($day - 1)); $divident = 100000; // variable for modulus $divider = 10000; // variable to shrink the divident for($i = 0; $i <= 4; $i++) // for loop to fill the array with days alive { $daysArray[$i]= floor((DAYS_ALIVE % $divident)/$divider); //calculates the single digit to store in array $divident= $divident/10; //after every iteration the divident is decreased $divider= $divider/10; //after every iteration the divider is decreased } echo "<table border='2' width='100%'>"; $arraySize = count($daysArray); //variable for the array size for($k=0;$k<=$arraySize-1;$k++) { echo "<tr>"; for($j=1;$j<=$daysArray[$k];$j++) { echo "<td> * </td>"; } echo "<td>$daysArray[$k]</td>"; } echo "</table>"; ?> What I want is something like this. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=358122.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=317025.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=330967.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=313836.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=321459.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=345265.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=355480.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=354977.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=348465.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=330834.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=331683.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=346821.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=330080.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=346771.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=355432.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=314271.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=313840.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=319161.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=350064.0 |