<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[we developers forum - Easy to make mistake]]></title>
		<link>http://forum.wedevs.com/topic/16/easy-to-make-mistake/</link>
		<description><![CDATA[The most recent posts in Easy to make mistake.]]></description>
		<lastBuildDate>Sun, 04 Jan 2009 15:36:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Easy to make mistake]]></title>
			<link>http://forum.wedevs.com/post/58/#p58</link>
			<description><![CDATA[thanks (y)]]></description>
			<author><![CDATA[dummy@example.com (Tareq)]]></author>
			<pubDate>Sun, 04 Jan 2009 15:36:43 +0000</pubDate>
			<guid>http://forum.wedevs.com/post/58/#p58</guid>
		</item>
		<item>
			<title><![CDATA[Easy to make mistake]]></title>
			<link>http://forum.wedevs.com/post/54/#p54</link>
			<description><![CDATA[hellow…I am trying to post a very simple Example of php variabe assigning..Its easy to make mistake when we assign values.Run the php code:

[code]
<?php

$a=0;

$b;

if ($a==$b) print(”values are same<br>”);

else print(”Variables are different<br>”);

?>
[/code]



output: values are same.

It means the value of $b is 0.

yaa….thats right.when we declare a php variabe Its initial value is 0 in number format.In strig format it is an empty string…its different in C++.

Just try to edit the code like folowing:

[code]
<?php

$a;

$b;

if ($a==$b) print(”values are same<br>”);

else print(”Variables are different<br>”);

?>
[/code]

output is same coz both of these variables values are empty string or NULL..

we can print the value of $b.

printf(”%f”,$b);   //result is 0.0000…//

so be aware of using these types of variable assignment……..I think It will help you…..:)]]></description>
			<author><![CDATA[galib_setu@yahoo.com (galib)]]></author>
			<pubDate>Sun, 04 Jan 2009 13:05:42 +0000</pubDate>
			<guid>http://forum.wedevs.com/post/54/#p54</guid>
		</item>
	</channel>
</rss>
