postgresql - Striping unnecessary tags when printing into a textarea in PHP -
friends, print contents in text area named text. know window.print() function, using allows me print whole web page. need, though, print contents of specific textarea only...
my code given below:
<?php $sq="select * $db->db_schema.visit_reg patient_id=$user_id , complaint_id=$complaint_id"; $result=$db->query($sq); echo "<textarea name='text' rows='4' cols='47' >"; echo $result[0]['prescription']; echo "</textarea>"; ?> to reiterate, i'd print contents of textarea only, not whole web page.
you can use php strip tags, remove php , html tags given strings.
echo strip_tags($result[0]['prescription']); //it print text only.
Comments
Post a Comment