CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> Archive -> GotoCode Archive

 replace carriage enter to <br>

Print topic Send  topic

Author Message
Posted: 11/20/2003, 7:32 AM

can someone tell me haw can i replace carriage enter to <br> in php. i readed the topics before like this, but that is does'nt work. i know i need a custom code BeforeShow Event just i dont know what is that
(i tried this $forum1 = str_replace("\n", "<br>", $forum1 );).
and if i write a code, the background modify gray to white. is that mean the code are wrong?
Kevin A.
Posted: 11/22/2003, 2:54 AM

$text = "line1\nline2\nline3\n";
From Core PHP Programming (first one)

Posted: 11/22/2003, 5:42 AM

As I understand you’re using CCS.
In this case create field’s Before Show event and modify the field’s value there. E.g.:
global $form_name;
$form_name->forum->SetValue(str_replace("\n", "<br>", $form_name->forum->Value));

Note, this is sample code only, not cut-n-paste


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by  and YesSoftware, Inc.