title: How to implode array with key and value without foreach in PHP
body: <p><strong>Without foreach</strong>, 
  how can I turn an array like this</p>
  
  <pre><code>array("item1"=&gt;"object1", "item2"=&gt;"object2",......."item-n"=&gt;"object-n");
  </code></pre>
  
  <p>to a string like this</p>
  
  <pre><code>item1='object1', item2='object2',.... item-n='object-n'
  </code></pre>
  
  <p>I thought about <code>implode()</code> already, but it doesn't implode the key with it.</p>
  
  <p>If foreach it necessary, is it possible to not nest the foreach? </p>
  
  <p><strong>EDIT:</strong> I've changed the string</p>
  
  <hr>
  
  <p><strong>EDIT2/UPDATE:</strong> 
  This question was asked quite a while ago. At that time, I wanted to write everything in one line so I would use ternary operators and nest built in function calls in favor of foreach. That was not a good practice! Write code that is readable, whether it is concise or not doesn't matter that much.</p>
  
  <p>In this case: putting the foreach in a function will be much more readable and modular than writing a one-liner(Even though all the answers are great!).</p>