TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 11-18-2009, 07:22 AM   #1 (permalink)
The Visitor
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
starterup is on a distinguished road
Default Comparison Operators - super easy

Hello Everyone,

I have just started learning php as my first programming language yesterday. I am following a tutorial at devzone.zend.com and just covered basic comparisons.
When I enter this code

Code:
<?php
$one = 1;
$two = 2;

$less = ($one < $two);
echo $less;
?>
I get the result of "1" instead of "true", and for "false" it doesn't show anything; just a blank.

My question: is this normal? Every tutorial I've looked at and even the php5 manual says it should result as a Boolean value.
Am I doing something wrong?

I am running xampp on windows vista x86. My other code on the page (simple addition) works fine.

Thank you in advance for your help.
starterup is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy to Modify Login Script with Hierarchical User Permissions and XML Account File Wildhoney Script Giveaway 4 05-04-2011 06:11 AM
How easy is it to create RSS feeds? Brook Absolute Beginners 4 02-03-2008 08:10 PM


All times are GMT. The time now is 07:46 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design