33

validatecolor

validate_color
SYNOPSIS

validate_color($color, $with_hashmark=true)

DESCRIPTION
CODE
  1. function validate_color($color, $with_hashmark=true) {
  2.     return preg_match($with_hashmark ? '/^#?([0-9A-F]){6}$/i' : '/^([0-9A-F]){6}$/i', $color);
  3. }

Commentaires

Votre commentaire :
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip aide 2000

Entrez un maximum de 2000 caractères.
Améliorez la présentation de votre texte avec les balises de formatage suivantes :
[p]paragraphe[/p], [b]gras[/b], [i]italique[/i], [u]souligné[/u], [s]barré[/s], [quote]citation[/quote], [pre]tel quel[/pre], [br]à la ligne,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]commande[/code], [code=langage]code source en c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].