riicko
|
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 |
|
nl2br()
<?php
$text = "line1\nline2\nline3\n";
Print(nl2br($text));
?>
From Core PHP Programming (first one)
|
|
|
Nicole
|
Posted: 11/22/2003, 5:42 AM |
|
Hello,
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
|
|
|
|