mark110384 Posted November 10, 2008 Share Posted November 10, 2008 Is it possible to a assisgn a PHP varable to a DIV ID? For example <div id="<? echo "$div_id"; ?>" > But that doesn't work. Thanks Quote Link to comment Share on other sites More sharing options...
bobbinsbro Posted November 10, 2008 Share Posted November 10, 2008 try: <div id="<? echo $div_id; ?>" > (no need to use quotes). also make sure you have short tags enabled. Quote Link to comment Share on other sites More sharing options...
premiso Posted November 10, 2008 Share Posted November 10, 2008 It is possible I would try this: <?php $div_id = "test"; ?> <div id="<?php echo $div_id; ?>" > This should output on the view source: <div id="test"> I think that is what you were asking. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.