I am using this code <?php $values = get_post_custom_values("lyrics"); echo $values[0]; ?> PHP: to get the lyrics I am adding in the custom field, but when I am adding content like: means line by line BUT it outputs it like: That means in single line Please help someone to get content as it was entered.
Give this a try: <?php $values = get_post_custom_values("lyrics"); echo "<p>".nl2br($values[0])."</p>\n"; ?> I am not a "developer" and have not tested this, so there may be a better way, but it might work for you. You can learn more here if needed: http://us.php.net/nl2br Good luck!
Hey Thanks for the help it is working like I want but it is adding 2 <br/> after each line can you make it 1 ??
Cool. You are Here's a couple things to try: 1. remove the \n from the end of the code and try it again 2. remove the <p> </p> tags Good luck
Thanks it worked after making it like this <?php $values = get_post_custom_values("lyrics"); echo nl2br($values[0]); ?>