Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Mar 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    divs and PHP problem :(

    Hi!

    I am struggling with a problem. I have a footer on a page (its a generic page its not me who wrote it) and i have "adressFcb" tag nested in "footerlinks" tag. The thing is that I want to swap the two things.
    I 'd like to make adressFcb tag and all the things it contains to appear within the footerlinks div, and then all the links (.implode(" | ",$arr).) to appear after.
    Im not an expert in PHP and im struggling with the code.

    I started to simply swap the to elements, and it worked, but due to some syntax errors (I presume) css didnt work at all. I tried to move everything in the same tag and got rid of the other, but again some difficulties came up becouse i do cant integrate this part : (implode(" | ",$arr).)

    this is the original code:

    PHP Code:
    if($arr!=array()) $res="<div class=\"footerlinks\">".implode(" | ",$arr).'<div class="addressFcb"> <p>Austria<br>Kertner 32<br>+36(9556)555625-57867<br>+44(35)23386-2876</p><a href="mailto:lafflo.kukac@ggh.net"><b> lafflo.hefg(at)ggh.net</b></a></p><p>*</p><p><a target="_blank" href="http://www.facebook.com/pages/4848463326153795"><img src="<resource>facebook-hu_alt.png</resource>" alt="Facebook kapcsolódás" width="45" height="45" ></a> <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/pages/4848463326153795&layout=button_count&show_faces=true&width=110&action=like&font&colorscheme=dark&height=25" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:25px;" allowTransparency="true"></iframe>
    </div></div>'


    this is what i started to change:



    PHP Code:
    if($arr!=array()) $res="<div class=\"footerlinks\">"<div class="addressFcb"> <p>Austria<br>Kertner 32<br>+36(9556)555625-57867<br>+44(35)23386-2876</p><a href="mailto:lafflo.kukac@ggh.net"><blafflo.hefg(at)ggh.net</b></a></p><p>*</p><p><a target="_blank" href="http://www.facebook.com/pages/4848463326153795"><img src="<resource>facebook-hu_alt.png</resource>" alt="Facebook kapcsolódás" width="45" height="45" ></a> <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/pages/4848463326153795&layout=button_count&show_faces=true&width=110&action=like&font&colorscheme=dark&height=25" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:25px;" allowTransparency="true"></iframe>
    </
    div>.implode(" | ",$arr).</div>; 
    please someone help me!
    Thx
    Last edited by Inigoesdr; 05-25-2011 at 05:41 PM.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Yech. If you were to write that HTML mark-up so it's humanly readable (indented, etc), you'd see there are some obvious problems with it.

    1. A <p> tag needs a matching </p> tag.
    2. The <b> tag is deprecated and has been for, what, 10 years now?

    It's not surprising the CSS isn't working.

  • #3
    New Coder
    Join Date
    Mar 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, thank you very much for the information, but as a person who knows very little about php and html coding, thats why I came here for...help. I need a working site, everything is ready except this. So any help appreciated.

  • #4
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    I don't know what to tell you; Google "html tutorial" and become familiar with coding proper HTML, for starters.

  • #5
    New Coder
    Join Date
    Mar 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    As a MOD why are so reluctant to help, really?

  • #6
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts


    Thank you for giving me a chuckle. Maybe I can explain myself gratiously here. (More likely, I'll come across as an arrogant prick. I apologize in advance.)

    My notion of "help" and your notion of "help" are two very different things. Your notion is for someone to fix up your code and deliver it to your inbox with a nice yellow bow tied round it, 100% tested and ready to drop into place, no muss no fuss.

    MY notion of "help" is to give you enough insight into the problem so you can become empowered enough to fix your code yourself, using your new-found understanding of what the problem is.

    I believe I succeeded, at least partially, in helping you, in-so-far as I gave you some pretty decent ideas of what might be wrong with your HTML markup. Since you then came back at me saying you know very little about HTML, I suggested you accumulate some background knowledge, which would both help you solve your immediate problem and equip you with some basic HTML skillz to help you going into the future.

    Hopefully I've helped you understand where I'm coming from. Feel free to ignore my "help".

  • #7
    New Coder
    Join Date
    Mar 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dear mod!

    Next time i think is a better option to tell me to eg. escape the quotes, and not sending me to google basic html.

    I fixed the problem myself by the way, so thank you for nothing.

    I hope we agree that in view of the previous circumstances, wouldnt be fair to ban me from the forum.

    regards,


    B

  • #8
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,093
    Thanks
    51
    Thanked 506 Times in 493 Posts
    No-one is talking about Banning anyone.

    Fumigator is right though, this is a forum for assistance and solving problems, not giving away fully featured projects.

    Frankly it does become a bit tiresome to keep seeing these posts from people who "don't know much" who think they can come here and have us do all the hard work.

    IF you have a project and you need help to overcome an obstacle then sure we're happy to help. IF you come here with minimal knowledge and expect us to help you build a super-project then i'm afraid it won't happen. You need to pay someone instead.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •