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

PHP Help

Discussion in 'White Hat SEO' started by jp_smith86, Feb 11, 2013.

  1. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:
    Hi friends,


    I want to create a binary tree on my website. something like this...

    binary.jpg

    how i can create this.. can i have the code please.. i don't have any idea..
     
  2. Schvamp

    Schvamp Power Member

    Joined:
    Feb 13, 2012
    Messages:
    684
    Likes Received:
    549
    Location:
    Hogwarts
    Code:
    <?php
    echo '<img src="http://www.blackhatworld.com/blackhat-seo/attachments/white-hat-seo/24544d1360609413-php-help-binary.jpg" alt="a three"/>';
    ?>
    Kidding, dont rly get what your asking for, a three for what?
     
  3. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:
    I'm asking for a Binary TREE not three
     
  4. innozemec

    innozemec Jr. VIP Jr. VIP

    Joined:
    Aug 19, 2011
    Messages:
    5,290
    Likes Received:
    1,799
    Location:
    www.Indexification.com
    Home Page:
  5. Crapper

    Crapper Junior Member

    Joined:
    Sep 28, 2011
    Messages:
    126
    Likes Received:
    14
    Home Page:
    Well, I think you need a css expert here. If your data is from a database (MySql for instance) you would use php to get the data. After that you could style it with css.

    Before someone can help you you have to be a little bit more specific I think. So, what is your data source ?

    P.S I'm not a great css guy myself but I know some php
     
  6. Crapper

    Crapper Junior Member

    Joined:
    Sep 28, 2011
    Messages:
    126
    Likes Received:
    14
    Home Page:
    Whahahaa........
     
  7. metra

    metra Junior Member

    Joined:
    Jun 6, 2012
    Messages:
    156
    Likes Received:
    49
    Location:
    -. ..- .-.. .-..
    Here's some binary tree code (recursive). Had some trouble putting the code in here (it was losing it's formatting with the PHP tags.

    I got this from StackOverflow and believe this is what you were looking for, a general binary tree layout in PHP :)
    Code:
    http://stackoverflow.com/questions/5020738/php-binary-tree-recursion-algorithm
    See the second answer post.

    Best,
    - Metra
     
    • Thanks Thanks x 1
  8. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:
    Exactly as you said... It's mysql.. using PHP... I think it can be done with php.. but don't know how.. :(
     
  9. Schvamp

    Schvamp Power Member

    Joined:
    Feb 13, 2012
    Messages:
    684
    Likes Received:
    549
    Location:
    Hogwarts
    I apologize, mixed the words up in the post, english isnt my main languish.
    I know a bit of PHP and my point was that mabye you should include some more info in your original post.
    What's in the source/nodes/childs?
     
  10. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:

    Thanks bro.. truly was looking for something like this... Thanks a ton.. :)
     
  11. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:
    in source: it will be user ID, sponser ID, prosper ID
     
  12. metra

    metra Junior Member

    Joined:
    Jun 6, 2012
    Messages:
    156
    Likes Received:
    49
    Location:
    -. ..- .-.. .-..
    Welcome :)

    You can structure it just like the tree you posted above in your image, and access it through the tree function, browse through levels, etc.

    Best,
    - Metra
     
  13. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:
    Yeah... hope so i can do this... lets try and see whats come out.... thanks for your help
     
  14. jp_smith86

    jp_smith86 Senior Member

    Joined:
    Jul 6, 2012
    Messages:
    855
    Likes Received:
    340
    Location:
    DIL APNA PUNJABI
    Home Page:
    Stuck in the middle.. :(
     
  15. pitbulllopez

    pitbulllopez Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 19, 2012
    Messages:
    1,085
    Likes Received:
    45
    i dont really know about the coding stuff as im not a coder but i can surely say you have got a very nice idea there.