This may seem stupid, but I can only do basic if then statements.
What I dont know how to code is if variable has data then another variable equals something.
Im using variables in a config.php, and i need code to determine if a variable has any data, then makes a new variable have data, but if teh first variable is empty, then the new variable in empty.
that would work, but i need it to determine if the variable has a value at all. then do code. I wont know what the variables value will be, so i wouldnt be able to get it to work with that
Last edited by owt200x; 10-18-2008 at 10:46 PM..
Reason: needed to clarify response
and i need code to determine if a variable has any data, then makes a new variable have data, but if teh first variable is empty, then the new variable in empty.
Check if variable has any value.
Code:
echo "$value";
if variable is empty
Code:
if ($value == "")
{
//Its empty
}
else {
//Its not empty
}
Or you could do this. To change a variable if its empty into one with data.
that would work, but i need it to determine if the variable has a value at all. then do code. I wont know what the variables value will be, so i wouldnt be able to get it to work with that