Jump to content

need help with making an indent or tab


nicolette

Recommended Posts

ok so here is a section of my code

if (!isset($_POST['title']) || trim($_POST['title'])=="")
	{
		die ('Error: You must enter a course title.');
	}
else
	{
		$title = $_POST['title'];
		echo "<p><span style='font-weight:bold'>Course Title</span><span style='font-weight:normal'>           :   $title</span></p>"; 
	}
if (!isset($_POST['instname']) || trim($_POST['instname'])=="")
	{
		die ('Error: You must enter an instructor name.');
	}
else
	{
		$instname = $_POST['instname'];
		print "<p><span style='font-weight:bold'>Instructor</span><span style='font-weight:normal; text-indent:500px'>:  $instname</span></p>";
	}if (!isset($_POST['phn']) || trim($_POST['phn'])=="")
	{
		die ('Error: You must enter a phone number.');
	}
else
	{
		$phn = $_POST['phn'];
		print "<p><span style='font-weight:bold'>Phone </span><span style='font-weight:normal'>\t$phn</span></p>";
	}

 

ok now obviously the first else statement is bad with all the   I know but that is the problem I am running into I tried a css style on the next one and that isn't indenting and on the last one I have tried using \t although I don't know if it needs "", '', or nothing in this situation I tried all variations and I couldn't get that to work either can someone assist I need the output to look like this

 

Course Title            :  Whatever

Instructor              :  Whatever

etc...

 

Link to comment
https://forums.phpfreaks.com/topic/206369-need-help-with-making-an-indent-or-tab/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.