<?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: Fatal error: Cannot use string offset as an array in &#8230;</title>
	<atom:link href="http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/feed/" rel="self" type="application/rss+xml" />
	<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/</link>
	<description>Using technology to help your business</description>
	<lastBuildDate>Mon, 01 Mar 2010 03:12:01 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: tony</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-30071</link>
		<dc:creator>tony</dc:creator>
		<pubDate>Thu, 21 Jan 2010 06:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-30071</guid>
		<description>thanks frank! actually, the loop works fine unless I click to submit a comment. I define $author later in the code as a string so when it comes back to this part I think it still thinks it&#039;s a string. I added $author=array(); and it seemed to sort things out. Now I&#039;ve moved on to the main problem of the comment not inserting into the database! :)</description>
		<content:encoded><![CDATA[<p>thanks frank! actually, the loop works fine unless I click to submit a comment. I define $author later in the code as a string so when it comes back to this part I think it still thinks it&#8217;s a string. I added $author=array(); and it seemed to sort things out. Now I&#8217;ve moved on to the main problem of the comment not inserting into the database! <img src='http://informationideas.com/news/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frank</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-30063</link>
		<dc:creator>frank</dc:creator>
		<pubDate>Wed, 20 Jan 2010 17:53:21 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-30063</guid>
		<description>Tony,

Do the following
echo $author[$row[&#039;user_nicename&#039;]]; //to see what you get

I am guessing that it is already set as a string previously and that is why you are getting this &quot;cannot use string offset as an array&quot; error.</description>
		<content:encoded><![CDATA[<p>Tony,</p>
<p>Do the following<br />
echo $author[$row['user_nicename']]; //to see what you get</p>
<p>I am guessing that it is already set as a string previously and that is why you are getting this &#8220;cannot use string offset as an array&#8221; error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-30060</link>
		<dc:creator>tony</dc:creator>
		<pubDate>Wed, 20 Jan 2010 09:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-30060</guid>
		<description>Maybe it&#039;s appearing that way before it&#039;s approved? 
Here is a smaller piece of code:
$res = mysql_query($qry);
if ($res) {
     while ($row = mysql_fetch_assoc($res)) {
          $author[$row[&#039;user_nicename&#039;]][] = $row;       &lt;--this line
     }</description>
		<content:encoded><![CDATA[<p>Maybe it&#8217;s appearing that way before it&#8217;s approved?<br />
Here is a smaller piece of code:<br />
$res = mysql_query($qry);<br />
if ($res) {<br />
     while ($row = mysql_fetch_assoc($res)) {<br />
          $author[$row['user_nicename']][] = $row;       &lt;&#8211;this line<br />
     }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-30059</link>
		<dc:creator>tony</dc:creator>
		<pubDate>Wed, 20 Jan 2010 09:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-30059</guid>
		<description>Ah man I don&#039;t know what happened. Here is the code:

 $v) {
         $orderbydate[$v[0][&#039;post_date&#039;]][$k] = $v;
     }

     krsort($orderbydate);
     foreach ($orderbydate as $k =&gt; $v) {
         ksort($orderbydate[$k], SORT_STRING);
     }
}</description>
		<content:encoded><![CDATA[<p>Ah man I don&#8217;t know what happened. Here is the code:</p>
<p> $v) {<br />
         $orderbydate[$v[0]['post_date']][$k] = $v;<br />
     }</p>
<p>     krsort($orderbydate);<br />
     foreach ($orderbydate as $k =&gt; $v) {<br />
         ksort($orderbydate[$k], SORT_STRING);<br />
     }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-30058</link>
		<dc:creator>tony</dc:creator>
		<pubDate>Wed, 20 Jan 2010 09:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-30058</guid>
		<description>Frank you are a saint to help everyone like this. Can you take a look at this piece of code? I noted the line I get the error from. The code runs fine at outputting the main page but when I try to submit a comment, I get the offset error on that line. It&#039;s a wordpress custom theme, I left off the rest of the code as it is loops for outputting the posts. (I think :) ) Thanks

 $v) {
         $orderbydate[$v[0][&#039;post_date&#039;]][$k] = $v;
     }

     krsort($orderbydate);
     foreach ($orderbydate as $k =&gt; $v) {
         ksort($orderbydate[$k], SORT_STRING);
     }
}</description>
		<content:encoded><![CDATA[<p>Frank you are a saint to help everyone like this. Can you take a look at this piece of code? I noted the line I get the error from. The code runs fine at outputting the main page but when I try to submit a comment, I get the offset error on that line. It&#8217;s a wordpress custom theme, I left off the rest of the code as it is loops for outputting the posts. (I think <img src='http://informationideas.com/news/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) Thanks</p>
<p> $v) {<br />
         $orderbydate[$v[0]['post_date']][$k] = $v;<br />
     }</p>
<p>     krsort($orderbydate);<br />
     foreach ($orderbydate as $k =&gt; $v) {<br />
         ksort($orderbydate[$k], SORT_STRING);<br />
     }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frank</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-29827</link>
		<dc:creator>frank</dc:creator>
		<pubDate>Wed, 06 Jan 2010 17:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-29827</guid>
		<description>Jake, try using single quotes around your string literals like [&#039;TempToken&#039;]. Use them in both the creation of the array and retrieving an element from the array. That is one problem that I can identify immediately.</description>
		<content:encoded><![CDATA[<p>Jake, try using single quotes around your string literals like ['TempToken']. Use them in both the creation of the array and retrieving an element from the array. That is one problem that I can identify immediately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jake</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-29523</link>
		<dc:creator>jake</dc:creator>
		<pubDate>Tue, 22 Dec 2009 16:38:06 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-29523</guid>
		<description>I am having a similar error.

Using
 $client = new MyFunction($authToken, $billerID); 
 $result = $client-&gt;GetTempToken(&#039;3488178870172224&#039;, &quot;John Doe&quot;, &quot;120&quot;, &quot;Y&quot;); 

I am trying to pull $result[&#039;result&#039;][&#039;TempToken&#039;] from the generated array below:

Array
 ( 
      [result] =&gt; Array 
               ( 
                        [ResultCode] =&gt; 00 
                        [ResultMessage] =&gt; 
                        [ResultValue] =&gt; SUCCESS 
                        [TempToken] =&gt; eb41d070-5f17-408f-aae7-09d0b971cc421b9fc5fe-490f-4cc6-8454-e99a658cf783 
                        [PayerId] =&gt; 1234567890123456
                        [CredentialId] =&gt; 811884 
               ) 
 )
 
 
I dont know if it matters, but I also try pulling $result[&#039;result&#039;][&#039;ExternalID&#039;] from the following generated array and it works fine.

Array 
 ( 
      [result] =&gt; Array 
               ( 
                        [ResultCode] =&gt; 00 
                        [ResultMessage] =&gt; 
                        [ResultValue] =&gt; SUCCESS 
                        [ExternalID] =&gt; 1234567890123456
               )
 )

Since the ExternalID array works, I am at a loss as to why the TempToken array doesn&#039;t work. I have tried running them as separate files with static content but I cannot seem to get it to work... 

Any ideas?
Thanks</description>
		<content:encoded><![CDATA[<p>I am having a similar error.</p>
<p>Using<br />
 $client = new MyFunction($authToken, $billerID);<br />
 $result = $client-&gt;GetTempToken(&#8217;3488178870172224&#8242;, &#8220;John Doe&#8221;, &#8220;120&#8243;, &#8220;Y&#8221;); </p>
<p>I am trying to pull $result['result']['TempToken'] from the generated array below:</p>
<p>Array<br />
 (<br />
      [result] =&gt; Array<br />
               (<br />
                        [ResultCode] =&gt; 00<br />
                        [ResultMessage] =&gt;<br />
                        [ResultValue] =&gt; SUCCESS<br />
                        [TempToken] =&gt; eb41d070-5f17-408f-aae7-09d0b971cc421b9fc5fe-490f-4cc6-8454-e99a658cf783<br />
                        [PayerId] =&gt; 1234567890123456<br />
                        [CredentialId] =&gt; 811884<br />
               )<br />
 )</p>
<p>I dont know if it matters, but I also try pulling $result['result']['ExternalID'] from the following generated array and it works fine.</p>
<p>Array<br />
 (<br />
      [result] =&gt; Array<br />
               (<br />
                        [ResultCode] =&gt; 00<br />
                        [ResultMessage] =&gt;<br />
                        [ResultValue] =&gt; SUCCESS<br />
                        [ExternalID] =&gt; 1234567890123456<br />
               )<br />
 )</p>
<p>Since the ExternalID array works, I am at a loss as to why the TempToken array doesn&#8217;t work. I have tried running them as separate files with static content but I cannot seem to get it to work&#8230; </p>
<p>Any ideas?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: baris</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-27812</link>
		<dc:creator>baris</dc:creator>
		<pubDate>Tue, 25 Aug 2009 12:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-27812</guid>
		<description>i tried and it works perfectly but it takes very long time.</description>
		<content:encoded><![CDATA[<p>i tried and it works perfectly but it takes very long time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frank</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-24195</link>
		<dc:creator>frank</dc:creator>
		<pubDate>Mon, 20 Apr 2009 20:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-24195</guid>
		<description>np.  Glad I can help.</description>
		<content:encoded><![CDATA[<p>np.  Glad I can help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lenz</title>
		<link>http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/comment-page-1/#comment-24192</link>
		<dc:creator>Lenz</dc:creator>
		<pubDate>Mon, 20 Apr 2009 20:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://informationideas.com/news/2006/06/14/fatal-error-cannot-use-string-offset-as-an-array-in/#comment-24192</guid>
		<description>oohhhh, noooo! :P

thanks, man!!!

something about trees and forests comes to mind :P

really appreciate it! thank you very much!</description>
		<content:encoded><![CDATA[<p>oohhhh, noooo! <img src='http://informationideas.com/news/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>thanks, man!!!</p>
<p>something about trees and forests comes to mind <img src='http://informationideas.com/news/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>really appreciate it! thank you very much!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
