Jump to content

ansipants

Members
  • Posts

    20
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

ansipants's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. tysm, i got that part working, how would i do the division correctly to find the percent?
  2. I was wondering if anyone would be able to help me as I've tried everything possible but and I can't get the time to display properly. I have 2 tables in my database, one table has a column that stores the time it would take to complete the physical assignment. I have already done the code that converts the time automatically into seconds, so that part is not the issue. Now, the second table i have captures data and then adds up all of the times from a user and spits it into a column "total_time". Now, the column it stores in is a varchar which shouldn't really matter, but the time goes in like 02:15:37.5, hours:minutes:seconds.milliseconds. I'm having a very hard time getting that to convert to seconds so that I can display the % difference between the first column mentioned in the first paragraph and the second column in this paragraph. Any help would be greatly appreciated. I've been working straight with no sleep for literally 3 days now and i think i fried my brain.
  3. you're so awesome! ty
  4. Ok, so I'm attempting to work on a script that will generate random codes and I also want to be able to change the multiplier with a form. Here is what I have so far: <code> <?php $chars = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; // Alpha numberic character $chars .= "123456789"; $chars .= "123456789"; $chars .= "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $chars .= "123456789"; $chars .= "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $chars .= "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $chars .= "123456789"; $chars .= "123456789"; $chars = str_shuffle($chars); $chars = substr($chars, 0, 15); /** This is the part I'm not sure how to do because it generates the same codes 5 times in a row and I want it to generate different codes on each line or maybe do a form that I can change the multiplier number to generate more */ $input = $chars; $multiplier = 5; $separator = "<br>\n"; print implode($separator, array_fill(0, $multiplier, $input)); print "<br>\n"; ?> </code> Sorry I'm a n00b and trying to learn more =)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.