Jump to content

Recommended Posts

Posted

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);
Posted

it should be "". '' only enters strings "" is different, it parses variables and makes \n newlines

foreach ($autori as $autore){
$lineautori .= $autore."\n";
}

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...