Look, I have, for example, a variable, but I need to put the result of a variable into a class, how to do it?

$count = "image"; printf( <div class='тут не знаю как писать'>Привет</div> ); 

Help, I apologize for such a binary question)))

  • binary question))) - Gorets

2 answers 2

And it is possible to state the code in more detail. If you make up a CMS and get a "class" there, then I can help, and if you write the solution itself, it is much simpler. <div class = "<? php echo '$ count';?>"> Hell </ div>

Well, how was it?

  • Let's try it for yourself right now - MaximPro
 $count = "image"; printf( "<div class='%s'>Привет</div>",$count ); 
  • also good ATP - MaximPro