1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trouble with HTML/PHP: Formatting Problems

Discussion in 'Computers, Games, Electronics etc' started by Citizen_Insane, Jul 18, 2005.

  1. Citizen_Insane

    Citizen_Insane Senior Member

    Messages:
    3,698
    Likes Received:
    3
    Joined:
    Jul 24, 2003
    Location:
    Minneapolis
    Ok, so I'm trying to setup a table that will print an unbroken string of characters in a formatted way. Here is my code:


    where it says [echo "<table width....etc" ] I am retrieving a very long string (up to 5000 characters) of unformatted text that I need to format to fit inside a table. Just so I don't have to answer it, what I'm outputting are DNA sequences, that's why they're so long.

    Does anyone know how to do this? I have the CSS code there, but it doesn't work in Firefox or Safari (and it needs to). Please help :worthy:
     
  2. Citizen_Insane

    Citizen_Insane Senior Member

    Messages:
    3,698
    Likes Received:
    3
    Joined:
    Jul 24, 2003
    Location:
    Minneapolis
    Ok, I fixed it using the "chunk_split" command after trimming all the spaces in the $text by using str_replace(" ","", $text);. Well, I guess this can be locked/deleted because I figured it out. Sorry for the unessiary post, but I was stumped there for a while.
     
  3. pissedoffsol

    pissedoffsol RETIRED

    Messages:
    49,693
    Likes Received:
    53
    Joined:
    Sep 28, 2002
    Location:
    Retirement Home
    wow. thats one hell of a FUCKED UP style sheet.

    you shoudl probably close your style tag,
    close your head tag,
    and open a body tag
    before you attempt to print a table.

    you should probably run your results through the w3 validator if you want it to work cross-broweser.
     
  4. Battle Pope

    Battle Pope New Member

    Messages:
    10,279
    Likes Received:
    60
    Joined:
    Jun 22, 2004
    Location:
    Southern Oregon Coast
    lol

    I was gonna say... there are opening tags... but where are the closing ones?
     
  5. Citizen_Insane

    Citizen_Insane Senior Member

    Messages:
    3,698
    Likes Received:
    3
    Joined:
    Jul 24, 2003
    Location:
    Minneapolis
    yeah...I suck at programming, but my boss is making me do it for work. :lol:
     
Verification:
Draft saved Draft deleted

Share This Page