Welcome Guest, Not a member yet? Register   Sign In
PHP Array Question
#1

[eluser]CodeIgniterNewbie[/eluser]
I have a method that returns an array. Is there a way to access a specific element of that returned array? For example:

Code:
// returns the array, but I only want, say, the value of the second element
$MyObject->GetMyArray();

// I'd like to do something like this, but it doesn't work:
$MyObject->GetMyArray[1];


Messages In This Thread
PHP Array Question - by El Forum - 06-16-2008, 08:12 PM
PHP Array Question - by El Forum - 06-16-2008, 08:56 PM
PHP Array Question - by El Forum - 06-16-2008, 09:38 PM
PHP Array Question - by El Forum - 06-17-2008, 06:46 PM
PHP Array Question - by El Forum - 06-17-2008, 07:17 PM
PHP Array Question - by El Forum - 06-17-2008, 09:25 PM
PHP Array Question - by El Forum - 06-17-2008, 09:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB