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!
i dont quite get you.
what exactly is that you want?
is it like this?
<div class="<?php echo $class; ?>"></div>
i m not ask the question. i m only some php relates information . so pls dont mind my friends.
huh?
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>
is that how it is?
coz i understood a different thing from the question
Lol, well.. yes but this is how it goes if you want to print php inside a div![]()
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![]()
Um do you know CSS ?
yeah sure i do![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks