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. 

http://php.net/manual/en/function.strip-tags.php


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -