I have html code like below <style> .mybarcode {position:absolute;width:2px;height:128px;background:#000;} </style> <div class="mybarcode"> <div style="margin-left:26px;"></div> <div style="margin-left:34px;"></div> <div style="margin-left:36px;height:48px;"> PHP: And I want to replace "mybarcode" style into inline CSS. So now code look like below example <div style="position:absolute;width:2px;height:128px;background:#000;"> <div style="margin-left:26px;"></div> <div style="margin-left:34px;"></div> <div style="margin-left:36px;height:48px;"> PHP: Is that possible using any PHP Script ? If any one has idea so please give me some help Thanks
You can do like this <?php $myCssStyle = "position:absolute;width:2px;height:128px;background:#000;"; ?> <div style="<?php echo $myCssStyle; ?>"> <div style="margin-left:26px;"></div> <div style="margin-left:34px;"></div> <div style="margin-left:36px;height:48px;"> </div> PHP: