<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[What is the different between return ($row) and return $row in php]]></title><description><![CDATA[<p dir="auto">while ($stmt-&gt;fetch()) {<br />
$row[] = array('id'=&gt;$id,'driver_id'=&gt;$driver_id,'duty_date'=&gt;$duty_date,'duty_timing_sec'=&gt;$duty_timing_sec);<br />
}</p>
<pre><code>$stmt-&gt;close();

if(!empty($row))
{
	return ($row);
}
else
{
	return "";
}
</code></pre>
]]></description><link>https://lankadevelopers.lk/topic/268/what-is-the-different-between-return-row-and-return-row-in-php</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 02:37:25 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/268.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Jun 2019 07:51:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to What is the different between return ($row) and return $row in php on Wed, 12 Jun 2019 04:31:09 GMT]]></title><description><![CDATA[<p dir="auto">There is no different, Usually brackets used to grouping the  calculation and get final value..</p>
<p dir="auto">Instead of,</p>
<pre><code>$amount = $price - $discount;
return $amount;
</code></pre>
<p dir="auto">You can use,</p>
<pre><code>return ($price - $discount);
</code></pre>
<p dir="auto">But in your case, <strong>$row</strong> is an <strong>Array</strong>. Array is a single element, So no need brackets..</p>
]]></description><link>https://lankadevelopers.lk/post/1696</link><guid isPermaLink="true">https://lankadevelopers.lk/post/1696</guid><dc:creator><![CDATA[b6]]></dc:creator><pubDate>Wed, 12 Jun 2019 04:31:09 GMT</pubDate></item></channel></rss>