+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 10 of 21

Thread: PHP coding?

  1. #1
    Newbie JackyRock is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    3

    PHP coding?

    Hi Friends,

    How do you use div class' in php such that you can attach html generated by php into that div class. Example
    Code:
    <html>
    <head>
    </head>
    <body>
    <div class="border">
    </div>
    
    <?php
    
    echo "This needs to go into the class border"
    
    ?>
    
    </body>
    </html>
    Last edited by Jaan; 02-09-2010 at 04:00 AM. Reason: Please use code tags when you are posting your codes!

  2. #2
    Learning Programmer chad is an unknown quantity at this point chad's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    57

    Re: PHP coding?

    i dont quite get you.
    what exactly is that you want?

    is it like this?

    <div class="<?php echo $class; ?>"></div>

  3. #3
    Newbie JackyRock is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    3

    Re: PHP coding?

    i m not ask the question. i m only some php relates information . so pls dont mind my friends.

  4. #4
    Learning Programmer chad is an unknown quantity at this point chad's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    57

    Re: PHP coding?

    huh?

  5. #5
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    18
    Posts
    2,058
    Blog Entries
    9

    Re: PHP coding?

    Well I guess your code have to be like this:

    Code:
    <html>
    <head>
    <title>Your website's title!</title>
    </head>
    <body>
    
    <div class="border">
    <?php
    
    echo "Here's my text inside my div!";
    
    ?>
    </div>
    
    </body>
    </html>
    Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
    www.trillhosting.com | support@trillhosting.com
    Hosting Plans | Write To Us | Support | Client Area | About Us

    CodeCall Blog | CodeCall Wiki

  6. #6
    Learning Programmer chad is an unknown quantity at this point chad's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    57

    Re: PHP coding?

    is that how it is?
    coz i understood a different thing from the question

  7. #7
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    18
    Posts
    2,058
    Blog Entries
    9

    Re: PHP coding?

    Lol, well.. yes but this is how it goes if you want to print php inside a div
    Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
    www.trillhosting.com | support@trillhosting.com
    Hosting Plans | Write To Us | Support | Client Area | About Us

    CodeCall Blog | CodeCall Wiki

  8. #8
    Learning Programmer chad is an unknown quantity at this point chad's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    57

    Re: PHP coding?

    yah well what i had in mind is like calling css class from "somewhere" like maybe in the database or it was posted in a different page..

    but i havent actually seen something like that before
    well just an idea.

    might as well try it

  9. #9
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    18
    Posts
    2,058
    Blog Entries
    9

    Re: PHP coding?

    Um do you know CSS ?
    Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
    www.trillhosting.com | support@trillhosting.com
    Hosting Plans | Write To Us | Support | Client Area | About Us

    CodeCall Blog | CodeCall Wiki

  10. #10
    Learning Programmer chad is an unknown quantity at this point chad's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    57

    Re: PHP coding?

    yeah sure i do

+ Reply to Thread
Page 1 of 3
1 2 3 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. PHP 5 and OOP
    By Jordan in forum PHP Tutorials
    Replies: 11
    Last Post: 09-22-2008, 01:58 AM
  2. PHP 4 end of life announcement
    By Jordan in forum News
    Replies: 4
    Last Post: 08-30-2007, 09:55 AM
  3. How long have you been coding php?
    By cpvr in forum PHP Forum
    Replies: 11
    Last Post: 07-11-2006, 12:41 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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