Number Only Values

23
Dec

One of the guys I work with stumbled upon a quick and easy way to use logic to check if a value is not a valid number (non dependant on type). The logic is as follows:

"123" == +"123" // true
"asdf" == +"asdf" // false

Now you can check to see if your variables are numbers even when they come through as strings (eg. from a form)

 

written by jackson

cheap jordans

rambled eggs  ,male  ,28

Feb 19, 2012

rambled eggs  ,male  ,28 <b><a href="http://www.ebuyairjordan.com/air-jordan-shoes-4-C4.html">retro jordan 4 cheap</a></b>  <b><a href="http://www.ebuyairjordan.com/">buy jordans</a></b> years old  ,Huazhou City <b><a href="http://www.ebuyairjordan.com/air-jordan-shoes-4-C4.html">cheap jordan 4</a></b>  arena in the <b><a href="http://www.ebuyairjordan.com/air-jordan-shoes-5-C5.html">jordans 5 for sale</a></b> town  people  .The  forum <b><a href="http://www.ebuyairjordan.com/air-jordan-shoes-5-C5.html">jordan 5 retro</a></b> in 200... <b><a href="http://www.ebuyairjordan.com/air-jordan-shoes-5-C5.html">air jordan 5 sale</a></b>

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
Complete this form and then pat yourself on the back.