Include <br> In PHP

Hi,

I think this is a pretty simple question.

I want to place a
at the end of each of these so it is displayed in a list rather that one long line.

[php] if(strlen($username) > 25 ) $errors[] = ‘� Username can not be longer than 12 characters’;
if(strlen($username) < 3 ) $errors[] = ‘� Username must be 3 characters or more’;
if(strlen($password) < 5 ) $errors[] = ‘� Password must be 5 characters or more’;
if(filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE) $errors[] = ‘� Please enter a valid email address’;[/php]

How would I do it?

Thanks

Have you tried just adding it between the single quotes with your warning text ?
[php]if(strlen($username) > 25 ) $errors[] = '&#149; Username can not be longer than 12 characters
';[/php]

Yes I have tried that. It didn’t work.

Thanks for your reply

Are you encoding the chars then ?
What happens when you put it in the quotes ?
Maybe you should give us more code so we can see what you are doing.

Where ever you are printing the error to can you add it there ?
[php]echo $errors.’
’;[/php]

That has worked. Thank you :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service