How to put PHP variable with lower and higher value (min and max)

Asked

Viewed 466 times

1

Hello, everybody!

I wonder if there is the possibility of making a variable in PHP with a min and max numeral, for example:

$var = /a numeral greater than or equal to 10 OR a numeral less than or equal to 20/;

Is there any way to do this directly in the variable without having to use if or similar?

Thanks in advance. Thank you! : D

1 answer

1


  • thank you, but tell me: is giving the following error: Notice: Undefined variable: rma_d in /Storage/Emulated/legacy/www/CTS/Decode.php on line 55

  • This error has nothing to do with what was asked or what I answered. You are trying to use a variable that has not been defined in your code.

  • Hahaha pulled out. Can I give you the code so you can better understand my situation? It would be something like: http://pastebin.com/mrMmracG

  • Next... your code doesn’t have much to do either. When you ask a question, it’s no use trying to oversimplify. You could have just put the code in the question, and given a detailed explanation of what you want (with an example of what you should have on the way out). Until the part about separating the numbers into groups, I could understand more or less what you want, about the part about picking the names later, it wasn’t very clear anymore. I suggest you create a new question explaining what you need to do exactly (explaining the problem, and not the way you think it will solve, because it may not be the best way)

  • A few reading tips, before asking the question: [Tour], [Ask] and very carefully, What is the XY problem.

  • All right. Thank you very much, friend :D

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.