753 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Had an item featured on Envato Market
+4 more
AdamGold says
Of course, because in each loop you reset the value of the variable and then defines it again. You have 2 options: 1. Store it in an array
    foreach($object_id as $o) {
        $array[ $o->object_id ] = $o->object_id;
    }
2. make a joining variable
    foreach($object_id as $o) {
        $variable .= $o->object_id . ',';
    }
I dont quite understand what you mean.. Like what I meant to do now :D
I suggest you to do my 1st idea, but as I see in your first post, you’re trying to get all of the result into one variable with a comma between each one, right? So just copy my 2nd code and you got it.
I GIVE UP .
Why? What didn’t you understand?
444 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United Kingdom
TahaH-Studio says

never mind. I found an alternative. Thanks alot guys. Ivor lock the thread

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by