where and how to insert a line <br> or \n and making the results centered

What this short program does the user enters in a sentence and a number and when she/he clicks submit it will repeat the sentence typed in by the user the amount of times that the user specifys. I do have that working fine but what I can't figure out is how to make each of the sentences centered and one other the other. I know what the code is for centering = "text-align: center" but I keep getting errors everytime I try to make it center. I'm not exactully sure what line I would add it to either. I also know to make one sentence appear under the other you can use \n or \r or
but again I'm getting errors and I don't know exactly where to insert it into the program either. Please help.

<h2 style="text-align: center">Q4 Form</h2>
<form name="Q4" action=
<p>Sentences: <input type="text" name="wSentence" /></p>
<p>Number: <input type="text" name="anumber" /></p>
 <p><input type="reset" value="Clear Form" />&nbsp;
&nbsp;<input type="submit" name="Submit" value=
"Send Form"/></p>


	$sentences = $_POST['wSentence'];
	$number = $_POST['anumber'];
	$string = $sentences;
	$repeat = $number;
	echo str_repeat($string,$repeat)



I can’t see your result,…
Can you please post your process_Q4.php

Kind Regards,

I not sure how to post my results? I can type it out for your to show you what it looks like. As the user types in a sentence and then any given number lets say 5 the results looks like this

I need help I need help I need help I need help I need help

So I know what the code is to put in there \n, \r,
but I don't know how or where to put it to make these sentence one under the other. I also can't figure out where to add my code to center these sentences. Please advise.
Sponsor our Newsletter | Privacy Policy | Terms of Service