mardi 17 janvier 2017

PHP: Check if my string only contains numbers and "X" character

I retrieve the nexts values of my size products: 30X50 or 20x20

I want add the "cm" measure if this values contais the character x or X and only numbers.

@if($myvalue contains only the character x and numbers)
  cm // like 20x20cm
@endif

I need a regular expression. But I do not know how to do it



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ixh1nc
via IFTTT

Aucun commentaire:

Enregistrer un commentaire