<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP: Converting a bool value to a string value</title>
	<atom:link href="http://www.f15ijp.com/2010/07/12/php-converting-a-bool-value-to-a-string-value/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.f15ijp.com/2010/07/12/php-converting-a-bool-value-to-a-string-value/</link>
	<description>My digital notepad (notes etc)</description>
	<lastBuildDate>Fri, 27 Jan 2012 19:33:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: jc</title>
		<link>http://www.f15ijp.com/2010/07/12/php-converting-a-bool-value-to-a-string-value/comment-page-1/#comment-12731</link>
		<dc:creator>jc</dc:creator>
		<pubDate>Wed, 10 Aug 2011 08:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.f15ijp.com/?p=538#comment-12731</guid>
		<description>Hi, 
In case you need to output a boolean as string concatenated with 
another string: 

 $test_var = false;
 echo &quot;\$test_var is: &quot; . ($test_var ? &#039;true&#039; : &#039;false&#039;) . &quot;.&quot;; // will output &#039;$test_var is: false.
 echo &quot;\n&quot;;
 $test_var = true;
 echo &quot;\$test_var is: &quot; . ($test_var ? &#039;true&#039; : &#039;false&#039;) . &quot;.&quot;; // will output $test_var is: true.

Deleting the parentheses results in a significant change in the output (which I can&#039;t explain): $test_var is: true.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
In case you need to output a boolean as string concatenated with<br />
another string: </p>
<p> $test_var = false;<br />
 echo &#8220;\$test_var is: &#8221; . ($test_var ? &#8216;true&#8217; : &#8216;false&#8217;) . &#8220;.&#8221;; // will output &#8216;$test_var is: false.<br />
 echo &#8220;\n&#8221;;<br />
 $test_var = true;<br />
 echo &#8220;\$test_var is: &#8221; . ($test_var ? &#8216;true&#8217; : &#8216;false&#8217;) . &#8220;.&#8221;; // will output $test_var is: true.</p>
<p>Deleting the parentheses results in a significant change in the output (which I can&#8217;t explain): $test_var is: true.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

