I'm sure this is trivial to an expert, I just don't know how to do it exactly.
I have a for loop
for ($x = 1; $x <= $picCount; $x++) {
$finalUrl = $picUrl.$gsi.'&picfilename='.$vin.'_'.sprintf('%03d', $x) .'.jpg';
}
What I want to do is add each $finalUrl to the object or an array. How do I do that?
Example of final object:
stdClass Object
(
[title] => Blah
[test] => w00t!
[picUrl] => array(
http://example.com/image/xx1.jpg
http://example.com/image/xx2.jpg
http://example.com/image/xx3.jpg
http://example.com/image/xx4.jpg
)
)
$foois an array, then$foo[] = $bar;orarray_push($foo, $bar)will append an element to that array.