0

I have a massive page but I have recconstructed the error in a JS FIDDLE

http://jsfiddle.net/qsJ5R/

<li><input class="<?php echo $env;?>" type="checkbox" > This is Item 1</li>

This is the line that has the error.

It is not reading the class name as what the variable is equal too?

am i missing something or can you not do this ?

RixsonL
  • 89
  • 1
  • 1
  • 7

1 Answers1

0

Change your HTML as

<body>
<a href="http://jquery.com/">jQuery</a>
<?php $env = "env" ?>
        <ul class="chk-container">
           <li><input class="selecctall" type="checkbox"> Selecct All</li>
           <li><input class="<?php echo $env;?>" type="checkbox" > This is Item 1</li>
           <li><input class="checkbox1" type="checkbox" > This is Item 2</li>
           <li><input class="checkbox1" type="checkbox" > This is Item 3</li>
           <li><input class="checkbox1" type="checkbox" > This is Item 4</li>
           <li><input class="checkbox1" type="checkbox" > This is Item 5</li>
           <li><input class="checkbox1" type="checkbox" > This is Item 6</li>
           <li><input class="checkbox2" type="checkbox" > Do not select this</li>

        </ul>
</body>

The problem is that, you are not closing the php tag

Vinod VT
  • 6,946
  • 11
  • 51
  • 75