Frank Vèssia Posted September 23, 2011 Share Posted September 23, 2011 I have an array i want to save in a textarea field. How can i have one line per array value? I tried this code.. foreach ($autori as $autore){ $lineautori .= $autore.'\n'; } $libro->autore = $sanitizer->textarea($lineautori); Link to comment Share on other sites More sharing options...
Soma Posted September 23, 2011 Share Posted September 23, 2011 it should be "". '' only enters strings "" is different, it parses variables and makes \n newlines foreach ($autori as $autore){ $lineautori .= $autore."\n"; } Link to comment Share on other sites More sharing options...
Frank Vèssia Posted September 23, 2011 Author Share Posted September 23, 2011 It works, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now