fareedreg Posted January 11, 2010 Share Posted January 11, 2010 I am having file bookissueadd.php..... in which i am having tag <td height="21">Issue Charges</td> <td><div id="txtcharges"></b> </div></td> in another php file i am doing some calculation and get my value in variable $cal getbookname.php $cal = $bookprice/100*$perval; now my question is how can i put the value of $cal in front of html tag ISSUE CHARGES thanks Link to comment https://forums.phpfreaks.com/topic/188017-how-to-insert-value/ Share on other sites More sharing options...
soycharliente Posted January 11, 2010 Share Posted January 11, 2010 Look at the echo function in the manual. Link to comment https://forums.phpfreaks.com/topic/188017-how-to-insert-value/#findComment-992622 Share on other sites More sharing options...
oni-kun Posted January 11, 2010 Share Posted January 11, 2010 Yup. If you're still learning, than you can easily echo HTML or close the tags for php and insert the value manually like so: <td height="21"><?php echo $cal; ?> Issue Charges</td> <td><div id="txtcharges"></b> </div></td> Or you can simply define it within a string, where the HTML is supposed to show up: echo '<td height="21">' . $cal; . ' Issue Charges</td> <td><div id="txtcharges"></b> </div></td>'; //echo HTML as a string with $cal. Pass the values to the other page through include/sessions. Link to comment https://forums.phpfreaks.com/topic/188017-how-to-insert-value/#findComment-992623 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.