Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Kevin Blount
October 26, 2007, 9:48 pm
rate this thread
$name = $xml->user_info->user['name'];
$nickname = $xml->user_info->user['nickname'];
$age = $xml->user_info->user['age'];
$shoe_size = $xml->user_info->user['show_size'];
I want to compare name & nickname, and age & shoe_size, but I can't
figure out how, as all 4 are objects.
Basically I want to know if age > show_size or name == nickname.
How would I do that?
if ($age > $shoesize)
echo "age is higher";
echo "shoesize is higher";
but it ALWAYS comes out as "shoesize is higher", mostly I think
because I'm comparing objects, not integers. I just can't find out how
to convert the obj to an int, or compare two like-typed objects.
- » Can not login to remote SSH server using ssh2_auth_pubkey_file
- — Previous thread in » PHP Scripting Forum