Posts: 109
Joined: Sun Mar 31, 2013 1:36 pm
Location: Crawley, UK


Mon Mar 09, 2020 2:08 pm

I'd like to extend the styling class "max" to include the "$datamaxi24" mysql query result.

Code: Select all

echo '<div class="max">Hello</div>' .$datamaxi24['maxcffr'];

Any help appreciated, thank you.

User avatar
Posts: 10
Joined: Fri Nov 11, 2011 3:59 pm

Re: CSS in PHP

Thu Mar 26, 2020 4:28 am

Exactly what you're doing, in the PHP file, will create the HTML for the div, with the value of $datamaxi24 as a value, not as "$datamaxi24". Standard PHP stuff - "$variable" echoes the text, $variable echoes the value of the text (the value of $datamaxi24).

Return to “Other programming languages”