![]() |
Extremely basic PHP help needed.
Okay, i've already got this..
PHP Code:
Hopefully that actually makes sense. I'm so very clueless when it comes to this shit. |
PHP Code:
|
If w is a variable you can check with
if (empty($w)) { ... } else { ... } not sure if I get what you mean tough! |
SilverTab, thanks. That's exactly what i was looking for. psyko, thanks too, but not exactly sure what to do with what you gave me! But thanks anyways. Sorry for being so unclear in the first place.
|
Np !...glad I could be helpful :winkwink:
|
Chodadog... the isset() function checks to see if the variable has been set (if it has a value). if so, it gives a result of TRUE.
the code i posted checks to see if W has been given a value, and if not, it gives W a value of 99999 or whatever else you want. i posted it in one line, but it could be broken into several lines PHP Code:
|
Quote:
|
I always create a function like:
PHP Code:
|
another way(not tested btw) just cuz i have nothing better to do after i've watered the plants and taken my special pills. :thumbsup
$w = empty($w) ? 999999 : $w; |
All times are GMT -7. The time now is 07:40 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123