[PHP] Table generator.

Results 1 to 9 of 9
  1. #1
    Fuck you, I'm a dragon Pieman is offline
    MemberRank
    Apr 2005 Join Date
    The NetherlandsLocation
    7,414Posts

    [PHP] Table generator.

    www.pie-designs.net/tablegen.php

    It's not really finished yet, because I need to find a way to print the code. Anyway, feedback is appreciated.


  2. #2
    elporongaB
    Guest

    Re: [PHP] Table generator.

    Sorry, wrong section

  3. #3
    Account Upgraded | Title Enabled! kip0130 is offline
    MemberRank
    Nov 2006 Join Date
    937Posts

    Re: [PHP] Table generator.

    hmm to prinit it is java an opiton??
    Code:
    <script language="JavaScript">
    <!-- Begin
    if (window.print) {
    document.write('<form>'
    + '<input type=button name=print value="Print This Page" '
    + 'onClick="java script:window.print()"> </form>');
    }
    </script>
    hope i helped

  4. #4
    Omega FragFrog is offline
    MemberRank
    Aug 2004 Join Date
    The NetherlandsLocation
    5,630Posts

    Re: [PHP] Table generator.

    Erm, whats the use of it? I mean, you could write this in about 5 lines of code.. :eh:

  5. #5
    Account Upgraded | Title Enabled! Intelext is offline
    MemberRank
    Mar 2007 Join Date
    EuropeLocation
    1,228Posts

    Re: [PHP] Table generator.

    Quote Originally Posted by FragFrog View Post
    Erm, whats the use of it? I mean, you could write this in about 5 lines of code.. :eh:
    Maybe he is learning PHP making scripts like that...

  6. #6
    Omega FragFrog is offline
    MemberRank
    Aug 2004 Join Date
    The NetherlandsLocation
    5,630Posts

    Re: [PHP] Table generator.

    http://fragfrog.nl/nutwork/table.php?rows=5&colls=3

    The complete source:
    PHP Code:
    for($i 0$i intval($_GET['rows']); $i++) {
      
    $output .= "<tr height=10>";
      for(
    $j 0$j intval($_GET['colls']); $j++)
        
    $output .= "<td width=10>&nbsp; </td>\n";
      
    $output .= "</tr>\n";
    }
    $output "<table border=1>" $output "</table>";
    echo 
    $output "<p> " nl2br(htmlentities($output)); 
    Ok, that was 8 lines of code, but at least it shows the table source as well... :icon6:

  7. #7
    Alpha Member Suicide is offline
    MemberRank
    Jun 2005 Join Date
    A CoffinLocation
    2,498Posts

    Re: [PHP] Table generator.

    Quote Originally Posted by Pieman View Post
    www.pie-designs.net/tablegen.php

    It's not really finished yet, because I need to find a way to print the code. Anyway, feedback is appreciated.
    Just ask people to view the source code ^^ its all there.

  8. #8
    All is well... Wh005h is offline
    MemberRank
    Feb 2006 Join Date
    TejasLocation
    1,984Posts

    Re: [PHP] Table generator.

    Nah, just store all that code in a variable and then skim a bit off Frag's code and print it out lol
    Putting it inside some sort of separated box would make it look fancier lol maybe a txtbox or a colored div?

    But I do like Pie's better than Frag's just because rather than changing url vars Pie's has the fields for it, just more user friendly ^_^
    Course you can combine them together and use both.

    But if you really want to be fancy you can give it formatting ^_^
    Just throw in a few of those \t's and some font tags and make it look like some program's code viewer hehe. Possibly a printf? But I've yet to understand how printf works lol... I just avoid it and do things the long way

  9. #9
    Omega FragFrog is offline
    MemberRank
    Aug 2004 Join Date
    The NetherlandsLocation
    5,630Posts

    Re: [PHP] Table generator.

    Yeah, didn't want to bother with input fields, though ofcourse adding those is just another few lines of code Merely wanted to show that this is about as spectaculair as a paper hat, no offence meant..



Advertisement