lundi 22 mars 2021

How to remove space in html/php (if else) [closed]

I don't know how to properly phrase my problem but I guess it will be better if I visualize it here.

Basically, it shows 5 lines of text and I have an if else statement that will determine what line its supposed to show.

ex: The if else statement says it will only show lines 1,3,5

The output I'm having now

line 1

line 3

line 5

You see there are spaces in between where lines 2 and 4 should be

What I want my output to be

Line 1
Line 3 
Line 5

This is what I want to do, it will remove the space and just a have a straight line.

My code

if (LINE 1) 
{
  FUNCTION HERE
}  


if (LINE 2) 
{
  FUNCTION HERE
}  


if (LINE 3) 
{
  FUNCTION HERE
}  


if (LINE 4) 
{
  FUNCTION HERE
}  


if (LINE 5) 
{
  FUNCTION HERE
}  

I wont post my actual codes since it's kinda long but that's how my if statements are all structured since I am also positive that there is a problem with how the if statements are structured, I just don't know what. Thank you!

Aucun commentaire:

Enregistrer un commentaire