Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

line breaks

LEGEND ,
Jul 22, 2008 Jul 22, 2008
Hi all

I'm a php newbie, though quite familiar with asp.

I'm trying to get the line breaks showing when the 'DescTxt' field data is
inserted on my page. I know (I think!) this is something to do with
'replace', but I don't know how to apply it to the following:

<p><?php echo $row_rsItemDetails['DescTxt']; ?></p>

I have searched and searched, but it's all Greek to me! If someone could
help me out and show me how the above code should look, I'd be much obliged.

many thanks

Chris


TOPICS
Server side applications
194
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 22, 2008 Jul 22, 2008
LATEST
On Tue, 22 Jul 2008 15:12:32 +0100, "Sweens" <info@121technology.com>
wrote:

>I'm trying to get the line breaks showing when the 'DescTxt' field data is
>inserted on my page. I know (I think!) this is something to do with
>'replace', but I don't know how to apply it to the following:
>
><p><?php echo $row_rsItemDetails['DescTxt']; ?></p>

<p><?php echo nl2br($row_rsItemDetails['DescTxt']); ?></p>

Gary
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines