I have a survey with textboxes where the user tends to list titles using returns like:
Title 1
Title 2
Title 3
the php I wrote to send the results through email sends it that way also, I wrote a script that addresses each of the 10 textboxes that strips the returns and puts in // instead which lets me import it properly, but is there an easier way to approach this and address them all at one time?
thanks, Kathy
<php
//Purpose: replace carriage returns & line feeds with double-slashes in each comment.
$quest1Com = str_replace("\r","",str_replace("\n"," // ",$quest1Com));
$quest2Com = str_replace("\r","",str_replace("\n"," // ",$quest2Com));
$quest3Com = str_replace("\r","",str_replace("\n"," // ",$quest3Com));
$quest4Com = str_replace("\r","",str_replace("\n"," // ",$quest4Com));
$quest5Com = str_replace("\r","",str_replace("\n"," // ",$quest5Com));
$quest6Com = str_replace("\r","",str_replace("\n"," // ",$quest6Com));
$quest7Com = str_replace("\r","",str_replace("\n"," // ",$quest7Com));
$quest8Com = str_replace("\r","",str_replace("\n"," // ",$quest8Com));
$quest9Com = str_replace("\r","",str_replace("\n"," // ",$quest9Com));
$quest10Com = str_replace("\r","",str_replace("\n"," // ",$quest10Com));
?>