Hello every one,
I’ve recently started learning php and I’ve a fair understanding of the basics.
I’ve come across a problem where i need to read and display some data from a text area.(exactly what is written in the text area)
This simple code can help you understand my problem.
<form action="test.php" method="post">
<b>Test Area:</b><textarea rows="2" cols="135" name="var" wrap="physical"></textarea>
<input type="submit" value="Submit" />
test.php
<?php
$value = $_POST['var'];
// $test = explode("\n", $value);
// echo = $test;
echo $value;
?>
Basically if i type:
a
b
c
d,e
in the text area i want test.php to display the letters as it is.(not all in a single line).I’m sure ive missed something simple!!
Pls help