How I could store the result of this function in a string:
for($i=0; $i<=($totRows-1); $i++)
{
if($i<($totRows-1))
{ echo $objects[$i]['id'].","; }
else
{ echo $objects[$i]['id']; }
}
And for example it returns:
6,8,9
and I want to save it as a variable such as $var then when typing the following code:
echo $var;
I would have the same string
6,8,9
Thanks!
1 Answer