Closed Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: PHP coding?

  1. #1
    JackyRock is offline Newbie
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    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 02:00 AM. Reason: Please use code tags when you are posting your codes!

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    chad's Avatar
    chad is offline Learning Programmer
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    68
    Rep Power
    0

    Re: PHP coding?

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

    is it like this?

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

  4. #3
    JackyRock is offline Newbie
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Re: PHP coding?

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

  5. #4
    chad's Avatar
    chad is offline Learning Programmer
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    68
    Rep Power
    0

    Re: PHP coding?

    huh?

  6. #5
    Jaan Guest

    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>

  7. #6
    chad's Avatar
    chad is offline Learning Programmer
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    68
    Rep Power
    0

    Re: PHP coding?

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

  8. #7
    Jaan Guest

    Re: PHP coding?

    Lol, well.. yes but this is how it goes if you want to print php inside a div

  9. #8
    chad's Avatar
    chad is offline Learning Programmer
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    68
    Rep Power
    0

    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

  10. #9
    Jaan Guest

    Re: PHP coding?

    Um do you know CSS ?

  11. #10
    chad's Avatar
    chad is offline Learning Programmer
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    68
    Rep Power
    0

    Re: PHP coding?

    yeah sure i do

Closed Thread
Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. coding
    By diya in forum General Programming
    Replies: 5
    Last Post: 11-05-2011, 10:14 AM
  2. Need Help on php coding
    By Mastspace in forum PHP Development
    Replies: 5
    Last Post: 04-21-2010, 05:18 AM
  3. Coding Help
    By Hunter100 in forum JavaScript and CSS
    Replies: 4
    Last Post: 04-03-2010, 04:52 AM
  4. Coding an IRC# Bot, some help please :)
    By SgtPunishment in forum C# Programming
    Replies: 3
    Last Post: 03-27-2010, 10:14 AM

Tags for this Thread

Bookmarks

Posting Permissions

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