Jump to content

[SOLVED] if it is not numeric make it a 1


jakebur01

Recommended Posts

How can I make the below a 1 if it is not a number or if it is nothing at all. This column contains values like 3, 50, RL, , 2, 1, etc. I want to keep all the current numbers, but make it a 1 if it is blank or if it contains letters.

 $stdpack1=$row["$stdpack"];
  

 

 

Link to comment
https://forums.phpfreaks.com/topic/147069-solved-if-it-is-not-numeric-make-it-a-1/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.