Morty222 Posted October 9, 2008 Share Posted October 9, 2008 I am downloading data into an excel file. \t moves over 1 cell \n starts a new line These work fine. My question is I have 3 lines of data that I want in the same cell, but on different lines. Example: Line 1 Line 2 But all in the same cell. Alt+Enter does it when I work in excel. Anyone know how to write an Alt+Enter? Sample of my output: $line .= $orderID. "\t" . $quantity. "\t" . $message1 . "\n" .$message2. "\n" . $productmail . "\t" . $colormail . "\t" .$sizemail . "\t" .$liconmail . "\t" .$riconmail . "\t" .$ticonmail. "\t" ."\n"; I need $message1 and $message2 in the same cell, but on different lines. Quote Link to comment Share on other sites More sharing options...
zq29 Posted October 12, 2008 Share Posted October 12, 2008 Enclose your values in double quotes... <?php $line .= "\"$orderID\"\t\"$quantity\"\t\"$message1\n$message2\"\t\"$productmail\"\t\"$colormail\"\t\"$sizemail\"\t\"$liconmail\"\t\"$riconmail\"\t\"$ticonmail\"\n"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.