Jump to content

Tons of <br> tags being added to my php output


hey_suburbia

Recommended Posts

When this runs and I view the source code I get about 30 random <BR> tags that leave a giant gap in the middle of the code.

 

I get the <br> tags before this line:

<p align="center" class="style2">-----------------------------------------------------------------------</p>
<p align="center" class="style2">YOUR PERSONALIZED CARE PLAN -- WAYS TO HELP YOUR CHILD</p>

 

 

Full code:

 

 

<table border="0" align="center" cellpadding="5px" cellspacing="5px">

<!-- ----------------------  RE_EXPERIENCING ---------------------- -->
<tr><th colspan="2"><div align="center">Re-experiencing: Reliving what happened</div></th></tr>  
<?php 
	$counter = 1;
	$bgcolor = "";
	include("reactionInfo.php");
	$reactionInfoObject = new reactionInfo($_SESSION["step1b_POST"]);
	if($counter >= 1){
		foreach($reactionInfoObject->reexperienceBArray as $reexperienceObj){
			$counter++;
			if (($counter % 2) == 0){
				$bgcolor="#e6e6e6";
			}else{
				$bgcolor="#d3d3d3";	
			}
			echo("<tr>
					<td bgcolor='" . $bgcolor . "' width='370px'>
						<div align='left' class='tablePad'>" . $reexperienceObj[0] . "</div>
					</td>
					<td bgcolor='" . $bgcolor . "' width='220px'>
						 <div align='left' class='tablePad'>" . $reexperienceObj[1] . "</div>
					</td>
				  </tr>");
		}	
	}
?>
    
  <!-- ----------------------  AVOIDANCE ---------------------- -->
  <tr><th colspan="2"><div align="center">Avoidance: Staying away from reminders</div></th></tr>
  <?php
	$counter = 1;
	$bgcolor = "";

	if($counter >= 1){
		foreach($reactionInfoObject->avoidanceBArray as $avoidanceObj){
			$counter++;
			if(($counter % 2) == 0){
				$bgcolor="#e6e6e6";
			}else{
				$bgcolor="#d3d3d3";	
			}
			echo("<tr>
					<td bgcolor='" . $bgcolor . "' width='370px'>
						<div align='left' class='tablePad'>" . $avoidanceObj[0] . "</div>
					</td>
					<td bgcolor='" . $bgcolor . "' width='220px'>
						 <div align='left' class='tablePad'>" . $avoidanceObj[1] . "</div>
					</td>
				  </tr>");
		}
	}

?>
  <!-- ----------------------  Hyper-arousal ---------------------- -->
  <tr><th colspan="2"><div align="center" class='noSymptomsPad'>Hyper-arousal: Feeling anxious or jumpy</div></th></tr>
  <?php
	$counter = 1;
	$bgcolor = "";
	if($counter >= 1){
		foreach($reactionInfoObject->hyperBArray as $hyperObj){
			$counter++;
			if(($counter % 2) == 0){
				$bgcolor="#e6e6e6";
			}else{
				$bgcolor="#d3d3d3";	
			}	
			echo("<tr>
					<td bgcolor='" . $bgcolor . "' width='370px'><div align='left'>" . $hyperObj[0] . "</div></td>
					<td bgcolor='" . $bgcolor . "' width='220px'><div align='left'>" . $hyperObj[1] . "</div></td>
				  </tr>");	
		}
	}
?>
  <!-- ----------------------  Other Concerns ---------------------- -->
  <tr><th colspan="2"><div align="center">Other concerns</div></th></tr>
  <?php
	$counter = 1;
	$bgcolor = "";
	if($counter >= 1){
		foreach($reactionInfoObject->concernsBArray as $concernsObj){
			$counter++;
			if(($counter % 2) == 0){
				$bgcolor="#e6e6e6";
			}else{
				$bgcolor="#d3d3d3";	
			}
			echo("<tr>
					<td bgcolor='" . $bgcolor . "' width='370px'>
						<div align='left' class='tablePad'>" . $concernsObj[0] . "</div>
					</td>
					<td bgcolor='" . $bgcolor . "' width='220px'>
						 <div align='left' class='tablePad'>" . $concernsObj[1] . "</div>
					</td>
				</tr>");
		}
	}
?>
   <!-- ----------------------  Family Concerns ---------------------- -->
   <tr><th colspan="2"><div align="center">Concerns about how others in the family are coping</div></th></tr>
      <?php 
	$counter = 1;
	$bgcolor = "";
	if($counter >= 1){
		foreach($reactionInfoObject->copingBArray as $copingObj){
			$counter++;
			if(($counter % 2) == 0){
				$bgcolor="#e6e6e6";
			}else{
				$bgcolor="#d3d3d3";	
			}	
			echo("<tr>
					<td bgcolor='" . $bgcolor . "' width='370px'>
						<div align='left' class='tablePad'>" . $copingObj[0] . "</div>
					</td>
					<td bgcolor='" . $bgcolor . "' width='220px'>
						 <div align='left' class='tablePad'>" . $copingObj[1] . "
						 </div>
					</td>
				  </tr>");	
		}
	}
?>
</table>
<p></p>
<?php 
	if($reactionInfoObject->twoCount > 0){
		echo('You marked ' . $reactionInfoObject->twoCount . ' item(s) as "Always / Very much".  Most children have a few stress reactions to a sudden or frightening event like an injury, especially during the first few weeks.  Based on your ratings, your child his having at least some stress reactions that might be really bothering him.  There is a lot that you can do to help your child, but you may need some extra help');
	};
?>
    

<p align="center" class="style2">-----------------------------------------------------------------------</p>
<p align="center" class="style2">YOUR PERSONALIZED CARE PLAN -- WAYS TO HELP YOUR CHILD</p>
<p align="left" class="style1">Remember, parents should continue to watch for stress reactions for at least the first 6 weeks after their child is injured. To make sure that a child has the best recovery, parents should  call their child’s doctor or school counselor IF: 
<ul>
    <li>A child’s stress reactions go on for more than one month after the injury; or</li>
    <li>A child’s stress reactions get worse, bother him, or worry his parent(s); or</li>
    <li> A child’s stress reactions get in the way of his physical recovery. </li>
</ul>
</p>

<p align="center" class="style1">Here are the tips you chose based on your ratings of your child's reactions and your concerns.<br />
We encourage <strong>you</strong> to come back to the website as needed to explore other care tips</p>

<table border="0" align="center" cellpadding="5px" cellspacing="5px">
<tr><th colspan="2"><div align="center">How to help with Re-experiencing: Reliving what happened</div></th></tr>  
    <?php 
	echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>");
		foreach($_SESSION["tipsArray"][0] as $tip){
			echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>");
		echo("<br />");
		}
?>

<tr><th colspan="2"><div align="center">How to help with Avoidance: Staying away from reminders</div></th></tr>  
    <?php 
	echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>");
		foreach($_SESSION["tipsArray"][1] as $tip){
			echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>");
		echo("<br />");
		}
?>
<tr><th colspan="2"><div align="center">How to help with Hyper-arousal: Feeling anxious or jumpy</div></th></tr>  
    <?php 
	echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>");
		foreach($_SESSION["tipsArray"][2] as $tip){
			echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>");
		echo("<br />");
		}
?>

<tr><th colspan="2"><div align="center">How to help with other concerns</div></th></tr>  
    <?php 
	echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>");
		foreach($_SESSION["tipsArray"][3] as $tip){
			echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>");
		echo("<br />");
		}
?>

<tr><th colspan="2"><div align="center">How to help with concerns about how others in the family are coping</div></th></tr>  
    <?php 
	echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>");
		foreach($_SESSION["tipsArray"][4] as $tip){
			echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>");
		echo("<br />");
		}
?>

</table>

Here is the portion in question:

 

<p class="style2" align="center">-----------------------------------------------------------------------</p>
<p class="style2" align="center">YOUR PERSONALIZED CARE PLAN -- WAYS TO HELP YOUR CHILD</p>
<p class="style1" align="left">Remember, parents should continue to watch for stress reactions for at least the first 6 weeks after their child is injured. To make sure that a child has the best recovery, parents should  call their child’s doctor or school counselor IF: 
</p><ul>
    <li>A child’s stress reactions go on for more than one month after the injury; or</li>

    <li>A child’s stress reactions get worse, bother him, or worry his parent(s); or</li>
    <li> A child’s stress reactions get in the way of his physical recovery. </li>
</ul>


<p class="style1" align="center">Here are the tips you chose based on your ratings of your child's reactions and your concerns.<br>
We encourage <strong>you</strong> to come back to the website as needed to explore other care tips</p>

<br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br>
<table align="center" border="0" cellpadding="5" cellspacing="5">
<tbody><tr><th colspan="2"><div align="center">How to help with Re-experiencing: Reliving what happened</div></th></tr>  
    <tr><th ,="" colspan="2" bgcolor="#d3d3d3">TIPS</th></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Notice when your child is feeling worried or lost in their thoughts - and ask what's on their mind.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Listen when your child wants to talk.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>If your child has questions about his/ her injury, treatment, or any other parts of what happened, try to answer simply and honestly.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Help your child deal with overwhelming or troubling thoughts by learning how to 'take a break' from them at times - do something fun, spend time with friends, get busy with other activities.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Notice your own feelings. Are there times when you don't want to talk with your child about what happened - because it's upsetting to you? If so, be sure to reach out to family and friends to get support for yourself.</li></ul></td></tr>

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.