#15 Need to set attributes with no value (checked,selected,...)

open
nobody
None
5
2012-10-10
2009-07-08
Anonymous
No

I use joker attribute names (like %is_checked%blabla%) which are then replaced at runtime in my application by checked or by an empty string according to some computation...
How to set such an attribute ?
using $e->setAttribute("%is_checked%blabla%",""); generates %is_checked%blabla%="" ... I want only to generate %is_checked%blabla%
a $e->setNoValueAttribute() function would be great

Discussion

  • sorry, I did not see the $e->setAttribute("xxx",true); in the documentation...
    RTFM is the correct answer to this request....