0

Doe anyone here know the ascii code for the enter(newline)??
im not looking for the '\n' answer..
thanks..:)

5
Contributors
6
Replies
11
Views
4 Years
Discussion Span
Last Post by diafol
0

i think its 10 for newline
and you can get it using ord() function in php

hope this helps you

0
<?php
    $name_clean =$name;
    $name_clean = str_replace("↵","[ENTER]",$name_clean);
    $name_clean = str_replace("[ENTER]","&#13 ",$name_clean);
    $sql="iNSERT into INFO($name) values('$name_clean'";
    mysql_query($sql);
?>

I tried it but it's not working.. This is my problem..

 $name = "This is the Example.
    This is the example2";

The output I want to happen is..

    This is the example.
    This is the example2.

But when i displayed it on the webpage, the 1st sentence is concatenated with the 2nd sentence. So I need to use this. . .

$name = "This is the Example.<BR>
This is the example2";

Can you suggest an alternative solution for this.. thanks..

Edited by eiramana06

0

can you please explain your actual requirement?

so that we try to give a solution to your problem.

Edited by radhakrishna.p: getting clarity on the problem

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.