Jump to content


Photo

array problem


  • Please log in to reply
3 replies to this topic

#1 vampke

vampke

    Likes Etomite Forums!

  • Member
  • PipPip
  • 174 posts

Posted 23 November 2008 - 09:43 PM

Hi guys,

I'm trying to get a certain result from an array I generated using , using $etomite-> getIntTableRows
$myarray[$wantedIndex]

but this always returns

Array

instead of the content I want.
what's wrong with this?

Edited by vampke, 23 November 2008 - 09:44 PM.


#2 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 23 November 2008 - 10:45 PM

I'm trying to get a certain result from an array I generated using , using $etomite-> getIntTableRows

$myarray[$wantedIndex]


The resultset array holds each record as an array (in a 2 dimensional array), so you're almost there... So the data field would be is $myarray[$wantedIndex]['desired_field']... Therefore, pagetitle of the first record would be $myarray[0]['pagetitle']...

Hope this helps...

#3 vampke

vampke

    Likes Etomite Forums!

  • Member
  • PipPip
  • 174 posts

Posted 24 November 2008 - 02:17 PM

Hope this helps...


Sure does, thanks!
Just so i'm clear: my problem was because of my poor understanding of etomite, and not because of my poor understanding of php?

#4 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 24 November 2008 - 02:28 PM

Sure does, thanks!
Just so i'm clear: my problem was because of my poor understanding of etomite, and not because of my poor understanding of php?


Something like that... There are two different ways to use many of the extended API functions that I wrote years ago, way back when Alex was still leading the project... The $push parameter, when available, can be used to push the resultset into a two-dimensional array when set true, or will leave it as a MySQL resultset resource when set to false...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users