Hi Friends, How do you use div class' in php such that you can attach html generated by php into that div class. Example <html> <head> </head> <body> <div class="border"> </div> <?php echo "This needs to go into the class border" ?> </body> </html>
<html> <head> </head> <body> <div class="border"> <?php echo "This needs to go into the class border" ?> </div> </body> </html>
<html> <head> </head> <body> <div class="<?php echo "This needs to go into the class border"; ?>"> </div> </body> </html> PHP:
<html> <head> </head> <body> <div class="<?php echo "This needs to go into the class border";?>"> </div> </body> </html> if you are getting a value from any php variable then <html> <head> </head> <body> <div class="<?php $variable_name;?>"> </div> </body> </html> Thanks, Jimmy
Actually, the 2nd example is wrong. It should read; <html> <head> </head> <body> <div class="<?php echo $variable_name;?>"> </div> </body> </html> PHP: