what's wrong with this php code?
<p>Ok, the idea here is to have code that will append SF_ to all key names in an array.
I took my array (which is part of an object), flipped it, added the SF_, and flipped it back.</p>

<p>Somewhere in the process I lost some fields... </p>

<p>here's what I started with:</p>

<pre><code>object(stdClass)[12]
  public 'Affiliate_Code__c' =&gt; string 'XX-TXUJC3' (length=9)
  public 'AltEmail__c' =&gt; string 'benny@oxpublishing.com' (length=22)
  public 'City' =&gt; string 'Mobile' (length=6)
  public 'Email' =&gt; string 'benny@oxpublishing.com' (length=22)
  public 'Fax__c' =&gt; string '251-300-1234' (length=12)
  public 'FirstName' =&gt; string 'Benny' (length=5)
  public 'LastName' =&gt; string 'Butler' (length=6)
  public 'Phone' =&gt; string '251-300-3530' (length=12)
  public 'PostalCode' =&gt; string '36606' (length=5)
  public 'State' =&gt; string 'AL' (length=2)
  public 'Street' =&gt; string '851 E I-65 Service Rd' (length=21)
  public 'test1__c' =&gt; float 1
array
  'SF_Affiliate_Code__c' =&gt; string 'XX-TXUJC3' (length=9)
  'SF_Email' =&gt; string 'benny@oxpublishing.com' (length=22)
  'SF_City' =&gt; string 'Mobile' (length=6)
  'SF_Fax__c' =&gt; string '251-300-1234' (length=12)
  'SF_FirstName' =&gt; string 'Benny' (length=5)
  'SF_LastName' =&gt; string 'Butler' (length=6)
  'SF_Phone' =&gt; string '251-300-3530' (length=12)
  'SF_PostalCode' =&gt; int 36606
  'SF_State' =&gt; string 'AL' (length=2)
  'SF_Street' =&gt; string '851 E I-65 Service Rd' (length=21)
</code></pre>

<p>And here's my code:</p>

<pre><code>$response = $mySforceConnection-&gt;query(($query));



   foreach ($response-&gt;records as $SF) {
   }


    var_dump($SF);
    $SF = array_flip($SF);
   foreach ($SF as $key =&gt; $value){

    $SF[$key] = 'SF_'.$value;
    }

   $SF = array_flip($SF);
   echo "&lt;pre&gt;";
  var_dump($SF);
  echo "&lt;/pre&gt;";
  extract($SF);
</code></pre>

<p>Any idea?
I'm new to OO programming of any sort, and I'm sure this has something to do with it.
I'm so stupid I have to do:</p>

<pre><code>foreach ($response-&gt;records as $SF) { }
</code></pre>

<p>because I don't know how to get to that array any other way.
Help!
Thanks!</p>
