IF/ELSE on Parents And Children!
Posted: Wed Oct 28, 2009 11:42 am
l need help !
I have a variable called $value with $key and this variable has another variable called $value2 with $key2.
Both has content which are in my Database.
Now, l want to use an if/else argumentation to echo a statement!
1.If there is no $value2 in $value , please echo hallo!
2.Next question
And if there is $value2 in $value1 but no content in $value2, echo " hallo.
This is how l went with the first!
if(empty($value['content]))
echo "X";
else
echo "Y";
Well, it does not work fine.
I have a variable called $value with $key and this variable has another variable called $value2 with $key2.
Both has content which are in my Database.
Now, l want to use an if/else argumentation to echo a statement!
1.If there is no $value2 in $value , please echo hallo!
2.Next question
And if there is $value2 in $value1 but no content in $value2, echo " hallo.
This is how l went with the first!
if(empty($value['content]))
echo "X";
else
echo "Y";
Well, it does not work fine.