Answer the question
In order to leave comments, you need to log in
How to write classes in php code?
I tried to display my divs via php, and everything would be fine, but only the first class in the div is taken into account. Those. if it looks like this:
if (isset($_POST['currentTier']) && strpos($_GET['type'], 'placements')===false) $description .= "<div id=details-2 class=col-12 col-xl-4 col-lg-12 mb-xl-5 mb-5><div class=d-flex b-skills><div class=height:70px;><div class=text-bold>Текущая лига:</div> <div class=text-primary> ".$tiers[$_POST['currentTier']]."</div></div></div></div></br>";
Answer the question
In order to leave comments, you need to log in
We explain with a simple example how logical thinking can be used in programming.
$description = "<div id='details-2' class='col-12 col-xl-4 col-lg-12 mb-xl-5 mb-5'><div class='d-flex b-skills'><div class='height:70px;'><div class='text-bold'>";
echo $description,"\n";
echo addslashes($description);
Quote all classes to single or double (need to be escaped)
if (isset($_POST['currentTier']) && strpos($_GET['type'], 'placements')===false) $description .= "<div id=details-2 class='col-12 col-xl-4 col-lg-12 mb-xl-5 mb-5'><div class='d-flex b-skills'><div class='height:70px;'><div class='text-bold'>Текущая лига:</div> <div class='text-primary'> ".$tiers[$_POST['currentTier']]."</div></div></div></div></br>";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question