PHP - Kilobyte Numbering Format System
function forum_number_format($number, $decimals = 0) { global $lang_common; $x = round($number); $x_number_format = number_format($x); $x_array = explode(',', $x_number_format); $x_parts = array('k', 'm', 'b', 't'); $x_count_parts = count($x_array) - 1; $x_display = $x; $x_display = $x_array[0] . ((int) $x_array[1][0] !== 0 ? '.' . $x_array[1][0] : ''); $x_display .= $x_parts[$x_count_parts - 1]; return $x_display; //return is_numeric($number) ? number_format($number, $decimals, $lang_common['lang_decimal_point'], $lang_common['lang_thousands_sep']) : $number; }Let's take a look at this code. This is VERY, VERY hard for me to understand. But it's essentially converting numbers to their kilobyte equivalent. (For example: 1000 = 1k. 25000 = 25k 15000 = 15k My issue is.. What happens when the number is 1321 This will output 1.3k Why? Because it's using the round function on line 4. But, I'm trying to get it to display 1.32k Any idea how to do this? I've been trying: $x = round($number, 1);and other methods but with no luck. Edited by Monkuar, 23 January 2015 - 02:55 PM. Similar Tutorialsim building a forum and i was wondering how to make page numbers work, so only 10 or 20 posts show up, then it shows page 2, etc. like. 1, 2, 3, 4, 5 even better would be something like phpbb: 1 ... 6, 7, 8 im assuming this is some pretty advanced coding involved.... Code: [Select] <?php $query = "SELECT * FROM forum_posts WHERE topic_no='".$_REQUEST['topic_no']."' ORDER BY date ASC"; $result = mysql_query($query) or die("Error: ".mysql_error()); $fnames = array(); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { $fnames[] = $row; } for ($i = 0; $i < count($fnames); $i++) { $query = "SELECT views FROM forum_posts WHERE topic_no='".$fnames[$i][8]."' AND author='1'"; $result = mysql_query($query) or die("Error: ".mysql_error()); $views = array(); $views = mysql_fetch_array($result, MYSQL_NUM); $query = "SELECT createdate,alliance,rank,country,username FROM users WHERE username='".$fnames[$i][1]."'"; $result = mysql_query($query) or die("Error: ".mysql_error()); $user = array(); while ($row = mysql_fetch_array($result, MYSQL_NUM)) {$data = $row;} $query = "SELECT logo FROM udata WHERE username='".$fnames[$i][1]."'"; $result = mysql_query($query) or die("Error: ".mysql_error()); $logo = array(); while ($row = mysql_fetch_array($result, MYSQL_NUM)) {$logo = $row;} $query = "SELECT COUNT(username) FROM forum_posts WHERE username='$data[4]'"; $result = mysql_query($query) or die("Error: ".mysql_error()); $postc = mysql_fetch_array($result, MYSQL_NUM); $logoi = '<img src="'.$logo[0].'" width="100" height="100" /><br><br>'; $query = "SELECT admin FROM users WHERE username='".$fnames[$i][1]."'"; $result = mysql_query($query) or die("Error: ".mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_NUM)) {$acount = $row;} if ($acount[0] == 1) { $mod[$i] = '<font color="lightgreen">ADMINISTRATOR</font><br>'; } else { $query = "SELECT mteam FROM users WHERE username='".$fnames[$i][1]."'"; $result = mysql_query($query) or die("Error: ".mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_NUM)) {$mcount = $row;} if ($mcount[0] == 1) { $mod[$i] = '<font color="lightgreen">MODERATOR</font><br>'; } } if ($fnames[$i][1] == $info[3]) { $buttons[$i] = ' <div class="forumbuttons"> <form action="forums_edit.php" method="post" class="lineup"> <input type="hidden" name="postid" value="'.$fnames[$i][0].'"> <input type="submit" name="edit" class="submit" value="Edit" /> </form> <form action="forums_topic.php" method="post" class="lineup"> <input type="submit" name="delete" class="submit" value="Delete" /> <input type="hidden" name="postid" value="'.$fnames[$i][0].'"> <input type="hidden" name="username" value="'.$fnames[$i][1].'"> <input type="hidden" name="topicname" value="'.$fnames[$i][2].'"> <input type="hidden" name="forumid" value="'.$fnames[$i][6].'"> <input type="hidden" name="topic_no" value="'.$fnames[$i][8].'"> <input type="hidden" name="author" value="'.$fnames[$i][5].'"> </form> </div> '; } else { $buttons[$i] = ' '; } echo ' <tr> <td class="variable" align="center" valign="top"><a class="variable" href="browse.php?name='.$fnames[$i][1].'">'.$fnames[$i][1].'</a></td> <td class="variable" align="left">Post Subject: <a class="noline">'.$fnames[$i][2].'</a></td> </tr> <tr> <td align="left" valign="top" class="variable"> <div style="margin-left:10px"> '.$mod[$i].' '.$logoi.' Joined: <a class="noline">'.date('d-m-Y', $data[0]).'</a><br> Posts: <a class="noline">'.$postc[0].'</a><br> Alliance: <a class="noline">'.$data[1].'</a><br> Rank: <a class="noline">'.$data[2].'</a><br> From: <a class="noline">'.$data[3].'</a><br> </div></td> <td align="left" valign="top" class="variable"><a class="noline">'.$fnames[$i][4].'</a> </td> </tr> <tr> <td align="left" valign="center" class="variable"><div style="margin-left:10px"><a href="#top">Top</a></div></td> <td class="variable" align="right" valign="top"><div class="forumbuttons">'.$buttons[$i].'</div></td> </tr> '; } ?> </table> <br> <form action="forums_topic.php" method="post"> <table width="540" class="metal" cellpadding="1" cellspacing="1"> <tr> <td colspan="2" class="head">Reply</td> </tr> <tr> <td width="108" height="19" valign="top" class="variable"><div align="left">Message body:<br> <a class="noline">Enter your message here, it may contain no more than <STRONG>60000</STRONG> characters.</a></div></td> <td width="381" class="variable"><textarea name="message" id="message" cols="60" rows="8"></textarea></td> </tr> <tr> <td height="19" colspan="2" valign="top" class="variable"><div align="center"> <input type="hidden" value="<?php echo $forumid;?>" name="forumid"> <input type="hidden" value="<?php echo $_REQUEST['topic_no'];?>" name="topic_no"> <input type="hidden" value="<?php echo $tname;?>" name="topicname"> <input name="posted_reply" type="submit" class="submit" id="button" value="Submit"> </div></td></tr> </table> </form> <?php } ?> the code above is the output for the posts. help would muchly be appreciated! I am writing a small program that generates a sequential numbering array. I need to include potentially a prefix, leading zeros, a starting number, a suffix and a quantity and also reverse the generated values. example: P-000299-001 P-000298-001 P-000297-001 P-000296-001 P-000295-001 P-000294-001 P-000293-001 P-000292-001 P-000291-001 P-000290-001 P-000289-001 Here is my code to generate: <?php $quantity = "100"; $start = "200"; $leadingzeros = "000"; $prefix = "P-"; $suffix = "-001"; $i = $start + $quantity - 1; while ($i >= $start) { echo $prefix . $leadingzeros . $i-- . $suffix . "<br />\n"; } ?> The code all seem to function correctly until I increase the quantity to say 25000 numbers to be generated or if the number string gets too long and the server will just sit and spin until a "cannot be displayed error" appears in IE. It had been suggested to abandone the array and simply write the generated sequence to a file and this is the code to generated the file it - it really works great and is really fast. <?php $startTime = time(); // this is just for measuring execution time $quantity = "25000"; $start = "26000"; $length = 6; $prefix = "P-"; $suffix = "-001"; $file = "test.txt"; $fh = fopen($file, 'w') or die("Could not open $file for writing"); for($ix = 1, $nbr = $start; $ix <= $quantity; $ix++, $nbr--) { fprintf($fh, $prefix.'%0'.$length.'d'.$suffix."\n", $nbr); } // all done, let's see how long it took: $endTime = time(); echo "Script took about " . ($endTime - $startTime) . " seconds to run."; ?> I am using this program to generate numbering files used in the printing industry. The sequential numbering works great. I had to change your code slightly in order to produce a usable numbering file, I had to subtract "1" from the $start+$quantity in order to get the correct amount of numbers. For a start of 1000 and quantity of 10 you had 1010 as your first number and it should actually be 1009 to give you 10 numbers. $fh = fopen($file, 'w') or die("Could not open $file for writing"); for($ix = 1, $nbr = $start+$quantity-1; $ix <= $quantity; $ix++, $nbr--) P-001009-001 P-001008-001 P-001007-001 P-001006-001 P-001005-001 P-001004-001 P-001003-001 P-001002-001 P-001001-001 P-001000-001 Let's think of this as an 8.5" x 11" piece of paper going through a laser printer - if each page had one number on it the sequential number will be great. Anyway, here is the next challenge: Let's say we have one 5.5" x 8.5" on an 8.5" x 11" sheet twice or two up. Each with its own number on the left and right side of the paper. That after printing will be cut and stacked on top of one another and produce a pile that is still in the right order. We need to take the $quantity+$start-1 and divide by 2 and then interleave the two sets of numbers and stop the numbering set at the starting number. easy huh!!! P-001009-001 P-001004-001 P-001008-001 P-001003-001 P-001007-001 P-001002-001 P-001006-001 P-001001-001 P-001005-001 P-001000-001 Here is the code I have for an example: <?php $quantity = "10"; $start = "1000"; $leadingzeros = "00"; $prefix = "P-"; $suffix = "-001"; $i = $start + $quantity - 1; $quantity2 = $quantity / 2; $j = (int)($i - $quantity2); while ($j >= $start) { echo $prefix . $leadingzeros . $i-- . $suffix ."<br />\n" . $prefix . $leadingzeros . $j-- . $suffix . "<br />\n"; } ?> The third option is two completely different 5.5" x 8.5" items and two different numbering schemes on an 8.5" x 11" piece of paper. Here is the code I have been using for it. <?php $quantity = "10"; $start = "1000"; $leadingzeros = "00"; $prefix = "P-"; $suffix = "-001"; $quantity2 = "10"; $start2 = "2000"; $leadingzeros2 = "000"; $prefix2 = "Q-"; $suffix2 = "-005"; $i = $start + $quantity - 1; $k = $start2 + $quantity2 - 1; while ($i >= $start) { echo $prefix . $leadingzeros . $i-- . $suffix . "<br />\n" .$prefix2. $leadingzeros2 . $k-- . $suffix2 . "<br />\n"; } ?> Which produces: P-001009-001 Q-0002009-005 P-001008-001 Q-0002008-005 P-001007-001 Q-0002007-005 P-001006-001 Q-0002006-005 P-001005-001 Q-0002005-005 P-001004-001 Q-0002004-005 P-001003-001 Q-0002003-005 P-001002-001 Q-0002002-005 P-001001-001 Q-0002001-005 P-001000-001 Q-0002000-005 Thanks in advance Sorry if this belongs in the MySQL section. I figured it might be more of a PHP thing. I have a database where rows each have a number, which is used to determine what order they appear in on my PHP page. But right now they aren't like 1, 2, 3, 4, etc. They are a little jumbled because of deleting some and changing some, so they're more like 1, 3, 7, etc. Is there a way to make them 1, 2, 3, 4 with PHP? Like, put them in order and number them accordingly? Thanks. We have a php application that is just a form, that takes in data to a mysql database and then displays that data in queue(php web page) for the client. It has been working for the past 5 or more years. Six weeks ago, the client noticed that the numbering started skipping a number each time a request was entered. It then seemed to stop, now it has started again. See attached image. Some detail he after user has completed web form and hits submit, three fields are populated in the mysql "REQUEST" table, then the actually data from the submitted web form is sent to the ANSWER table. The REQUEST table is in sync and is always populated, and numbering is in sequence but upon submit, the actual data from the request does NOT always go to the ANSWER table hence the "skipping of numbers." What do I even begin looking at/for to determine what happened? Reminder: this is a 5+ year old app that worked fine until maybe 6 weeks ago. No changes have been made to the database or the code base since 2008. The code that adds the data to the ANSWER table [the one that appears to skip] is below. The applicate is in php 4.3.1, mysql 5, linux server.
Hello All, function convertTimeFormat($time12Hour) { // Initialized required variable to an empty string. $time24Hour = ""; // Used explode() function to break the string into an array and stored its value in $Split variable. $Split = explode(":",$time12Hour); // print_r(explode (":", $time12Hour)); => Array ( [0] => 09 [1] => 50 [2] => 08AM ) // Retrieved only "hour" from the array and stored in $Hour variable. $Hour = $Split[0]; $Split[2] = substr($Split[2],0,2); // Used stripos() function to find the position of the first occurrence of a string inside another string. if($Hour == '12' && strpos($time12Hour,"AM")!== FALSE) { // Code here } elseif(strpos($time12Hour,"PM")!== FALSE && $Hour != "12") { // code here } return $time24Hour; } $time12Hour = "09:50:08AM"; $result = convertTimeFormat($time12Hour); print_r($result); /* Input : "09:50:08AM"; Output : "21:50:08PM"; */
Hi all, I am currently making a website that has e-custom functions and a back end for the client. I want them to be able to upload images - but they need to be transparent. I do not want to leave this in the hands of the client, so I am looking at ways of using the GD library to make the change I got no issue with the png/gif type for upload/resize function since this type already transparent background but my major problems is how to deal with jpeg/jpg image type which is their background was not a transparent...so is it possible I can change/ convert to png/gif type upon successful of uploading image...so the new final image will be png/gif type with transparent background...is it doable...I am not even sure it is possible...? Thanks for any help.. hello dear PHP-Fans - greetings to you - and a happy new year!! i set up a WAMP-System on my openSuse 11.4 system. In order to learn as much as i can bout PHP i want to do some tests and write some scripts. Well the WAMP is allready up and running. Now i try to give the writing access to the folder mkdir /srv/www/ where the php-scripts should go in... i want to give write permission to all to all files in /srv/www As root I generally: mkdir /srv/www/ chown <webmaster usrername> /srv/www/ /srv/www/ should be readable and traversable by all, but only writeable by it's owner (the user designated as the webmaster.) can i do this like mentioned above,... Love to hear from you greetings db1 Hi im desperately in need of some help here.. Im exporting my html page data to csv but i am unable to get the data onto a new column the code is as follows HTML FORM Code: [Select] <form id="form1" name="form1" method="post" action="index.php"> <table class="formatTblClass"> <tr> <th colspan="6"><?=$message;?></th> </tr> <tr> <td width="68"><span>First Name</span></td> <td width="215"><input class="Name" type="text" name="fn" id="fn" /></td> <td width="62"><span>Last Name</span></td> <td colspan="3"><input class="Name" name="ln" type="text" id="ln" size="50" /></td> </tr> <tr> <td colspan="6"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="71">Address</td> <td width="721"><input class="Address" name="address" type="text" id="address" size="100" /></td> </tr> </table></td> </tr> <tr> <td><span>City</span></td> <td><input class="City" type="text" name="city" id="city" /></td> <td><span>State</span></td> <td width="148"><input class="State" type="text" name="state" id="state" /></td> <td width="24"><span>ZIP</span></td> <td width="255"><input class="ZIP" type="text" name="zip" id="zip" /></td> </tr> <tr> <td><span>Phone</span></td> <td><input class="Phone" type="text" name="phone" id="phone" /></td> <td><span>Email</span></td> <td><input class="Email" type="text" name="email" id="email" /></td> <td><input name="emailMe" type="checkbox" id="emailMe" value="Yes" checked="checked" /></td> <td>Please send me email</td> </tr> <tr> <td colspan="6"><span>Comments <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </span> <div align="center"> <input type="submit" name="Submit" id="Submit" value="Submit" /> <input type="reset" name="Reset" id="button" value="Reset" /> </div></td> </tr> </table> </form> <?php // Receiving variables @$pfw_ip= $_SERVER['REMOTE_ADDR']; @$fn = addslashes($_POST['fn']); @$ln = addslashes($_POST['ln']); @$address = addslashes($_POST['address']); @$city = addslashes($_POST['city']); @$state = addslashes($_POST['state']); @$zip = addslashes($_POST['zip']); @$phone = addslashes($_POST['phone']); @$email = addslashes($_POST['email']); @$emailMe = addslashes($_POST['emailMe']); @$comments = addslashes($_POST['comments']); // Validation //saving record in a text file $pfw_file_name = "formtest.csv"; $pfw_first_raw = "fn,\rln,\raddress,\rcity,\rstate,\rzip,\rphone,\remail,\remailMe,\rcomments\r\n"; $pfw_values = "$fn,\r$ln,\r$address,\r$city,\r$state,\r$zip,\r$phone,\r$email,\r$emailMe,\r".str_replace ("\r\n","<BR>",$comments )."\r\n"; $pfw_is_first_row = false; if(!file_exists($pfw_file_name)) { $pfw_is_first_row = true ; } if (!$pfw_handle = fopen($pfw_file_name, 'a+')) { die("Cannot open file ($pfw_file_name)"); exit; } if ($pfw_is_first_row) { if (fwrite($pfw_handle, $pfw_first_raw ) === FALSE) { die("Cannot write to file ($pfw_filename)"); exit; } } if (fwrite($pfw_handle, $pfw_values) === FALSE) { die("Cannot write to file ($pfw_filename)"); exit; } fclose($pfw_handle); echo("<p align='center'><font face='Arial' size='3' color='#FF0000'>thanx</font></p>"); ?> THIS IS THE OUTPUT I GET fn ln address city state zip phone emailMe comments Tom Sawyer shady lane new york new york NY124 123456789 tom@sawyer.com Yes comments THIS IS THE OUTPUT I AM LOOKING FOR fn Tom Harry ln Sawyer Potter address shady lane magic lane city new york xyz state new york xyz zip NY124 12343 phone 123456789 987654321 email tom@sawyer.com harry@magic.co.uk emailMe Yes Yes comments comments this is the comment please help me on this one.. unable to get the script export the data in top to bottom columnwise format echo "<font color='000000'>No Service Found At<br /></font>"<font color='000000'> .long2ip($ip)</font>; how should this be formated right now it's just outputting .long2ip($ip) '$playerlog admin logged into .long2ip($ip)' WHERE username='$player'") Hi Guys Could somebody tell me how i would put a line break into the code below i.e: 1.07 <br /> 2010 <?php echo date('d.m.Y',strtotime($news['created_at']));?> Thanks for your help Hello!! i want to save datetimes into a mysql database. Their format is dd-mm-yy hh:mm. I think mysql format for datetime is yy-mm-dd hh:mm..How can i convert them?? What Date Format is this... Code: [Select] echo '<div class="date">Published: ' . date('F j, Y', strtotime($publishedOn)) . '</div>'; And where can I find a listing of the different Date and Time Formats that will work with this? (I would like to display my date as "2012-02-26 2:40pm" for what it is worth...) Thanks, Debbie Code: [Select] $date =date("d F Y"); It will display 18 October 2011. If I need it to display 2011-10-18. How do it go about coding it? I have a date field in the database table of this format 2012-02-08. Now I want to select fields from the database where date >= $currentdate. Do I have to do someting like $currentdate=time(); //Then convert it into YYYY-MM-DD format? I have my date set in my database as: 2010-12-13 08:00:00 What I would like to do is use PHP to format the date when pulled out the database to say: December 13, 2010. I really do not need the time if we can toss that. I wish it was as easy as changing info in the database directly, but with teh way everything has been programmed, it would be too much work. Here is an example: $data = mysql_query("SELECT * FROM jos_jevents_repetition") or die(mysql_error('Error connecting to the database')); while ($row = mysql_fetch_array($data)) { echo "<label for='name'>Dates</label>", "<select type='text' name='name'>", "<option value=''>Please Select A Date </option>", "<option value='".$row['startrepeat']."'>".$row['startrepeat']." </option>", "</select>"; } Anyone know what's up with this? <?php $days = floor($posts['timestamp'] / (60 * 60 * 24)); $remainder = $posts['timestamp'] % (60 * 60 * 24); $hours = floor($remainder / (60 * 60)); $remainder = $remainder % (60 * 60); $minutes = floor($remainder / 60); $seconds = $remainder % 60; if($days > 0) { echo date("d/m/y", $posts['timestamp']); echo " at "; echo date("H:i", $posts['timestamp']); }elseif($days == 0 && $hours == 0 && $minutes == 0) { echo "few seconds ago"; }elseif($days == 0 && $hours == 0) { echo $minutes.' minutes ago'; }elseif($days == 0 && $hours > 0){ echo $hours.' hour ago'; }else{ echo "few seconds ago"; } ?> Hello Guys Does anyone knows how to parse an XML format? Im just learning how to parse a CSV string but now my job suddenly involves parsing an XML string.. Can you help me on this guys? This is my XML string.. Quote <?xml version="1.0" encoding="UTF-8"?><GetSMSInboundResponse><Transaction><Code>1</Code><Description>Transaction OK</Description></Transaction><SMSInbounds><InboundSMS><ID>3126274</ID><Originator>+639105701066</Originator><Destination>+447537404702</Destination><Keyword>UCB2</Keyword><Date>2012-01-24</Date><Time>12:31:11</Time><Body>UCB2 a text having 'qoute' "double qoute" and ,commas, hehe.</Body></InboundSMS></SMSInbounds></GetSMSInboundResponse> the result is similar to this Quote Array ( [1] => Array ( [1] => UCB2 [2] => 2012-01-24 [3] => 12:31:11 [4] => UCB2 a text having 'qoute' "double qoute" and ,commas, hehe. ) ) I would like to put the result on an array or a multi dimentional array.. I dont have any ideas about XML parsing i myself is having trouble of parsing a CSV string I would love to hear you comments or solution to my problem. Any help will be appreciated... thanks The raw output is this.. full example: http://instant.simplyhired.com/a/jobs/xml-v1/l-06238/q-engineer/ws-100/si-0/fdb-21/sb-rd/mi-10 I can generally get the value of this stuff.. like if I wanted the "jt" line I can get ENGINEER, and the rest of the data.. what i am having trouble with is getting the attribute (i think thats the right term for this with XML). For example the "src" line it as an attribute "url=" I am trying to figure out how to get that value.. Below is a sample of the raw.. and below that is the code I am working with to load up the XML. I know theres simple_xml but in my case thats not an option so I am working on slightly custom work (as little as it is). Code: [Select] <r> <jt>ENGINEER</jt> <cn url="">Soldream</cn> <src url="http://instant.simplyhired.com/a/job-details/view/jobkey-5109.J3H3036RVZPZ4RFRRKR/jp-0/hits-70?aff_id=2512">CareerBuilder</src> <loc cty="Tolland" st="CT" postal="06084" county="" region="" country="US">Tolland, CT</loc> <ls>2011-02-20T13:28:39Z</ls> <dp>2011-02-18T08:00:00Z</dp> <e>Engineer/CNC Machinist Tolland CT2429177 Aerospace MFG Co. seeks MFG/Design Engineer &amp; CNC Machinist with 5+ years of experience in aerospace manufacturing. Duties for engineers include developing new processes, drafting, and CNC programming. CNC Machinist should have knowledge of FANUC control. Send resume to...</e> <af></af> <pl url=""/> </r> $feedURL = 'http://instant.simplyhired.com/a/jobs/xml-v1/l-06238/q-engineer/ws-100/si-0/fdb-21/sb-rd/mi-10'; $doc = new DOMDocument(); $doc->load($feedURL); $arrFeeds = array(); foreach ($doc->getElementsByTagName('r') as $node) { $itemRSS = array ( 'title' => $node->getElementsByTagName('jt')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getAttributeNode('src'), 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, 'creator' => $node->getElementsByTagName('creator')->item(0)->nodeValue, 'permaz' => $node->getElementsByTagName('guid')->item(0)->nodeValue ); array_push($arrFeeds, $itemRSS); //print_r($arrFeeds); } array_unique($arrFeeds); ?> Hi guys I have this date script below which displays like so: 16/09/2011. Its fine but I now like it to display like this: 16 September 2011 Please I need help in twicking the code to do this Thanks! <?php //check to see if passing variable is set i.e. if true get day, month, year. if(isset($_GET['day'])){ $day = $_GET['day']; } else{ //Get today's date and put them in date, month, year $day = date("d"); } if(isset($_GET['month'])){ $month = $_GET['month']; } else{ $month = date("m"); } if(isset($_GET['year'])){ $year = $_GET['year']; } else{ $year = date("Y"); } echo $day."/".$month."/".$year; ?> |