Kindly consider this code fragment:
Code: Select all
$message = $_REQUEST['txtMessage'];Let the contents of the textarea field named txtMessage look like this:
Code: Select all
Line Number One
Line Number Two
Line Number ThreeNow I want to process the contents of $message in a way as to put a Line Number at the start of each line.
So, the final output would looke like this:
Code: Select all
1# Line Number One
2# Line Number Two
3# Line Number Three
Note: In fact, the contents of the $message are being emailed and I want to format the contents as shown above. Moreover, the text in the textarea field could be very lengthy.