FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » For loop not showing the entire array
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: For loop not showing the entire array [message #181848 is a reply to message #181847] Wed, 19 June 2013 14:58 Go to previous messageGo to previous message
Kevin Davis is currently offline  Kevin Davis
Messages: 5
Registered: May 2012
Karma:
Junior Member
Never mind,I found the solution myself.

On Wednesday, June 19, 2013 9:34:59 AM UTC-5, Kevin Davis wrote:
> Hi there,
>
>
>
> I'm stuck on something which I know could be simple..
>
>
>
> If you look at the following array:
>
>
>
> $data = json_decode($result, TRUE);
>
>
>
> then I have a counter:
>
>
>
> $i = 0;
>
>
>
> then of course a loop:
>
>
>
> foreach ($data as $temp)
>
> {
>
> $userId = $data['data']['items'][$i]['id'];
>
> echo $userId . "<BR>";
>
> $i++;
>
> }
>
>
>
> The problem is that the loop is only going through the first 2 records and there is more than 2... Is there a reason why?
>
>
>
> Thank you,
>
> Kevin
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: [OT] PHP Conference Argentina 2013
Next Topic: Read info from webcam video
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 18 09:46:16 GMT 2024

Total time taken to generate the page: 0.04322 seconds