Frank Vèssia Posted September 23, 2011 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);
Soma Posted September 23, 2011 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"; }
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