On Fri, 24 Aug 2001, Frank Loewenthal wrote:
> Hi
>
> Perhaps I am confused, but is it not possible to return arrays in PHP?
>
> Example:
>
> function getArray() {
> $ret = array('hallo','you');
> return $ret;
> }
>
> $r = getArray();
>
> for( $i=0;$i < count($r); $i++)
> e
Try "echo "$r[$i]" instead of echo "$r[i]".
Kirk
> -Original Message-
> From: Frank Loewenthal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 24, 2001 9:33 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Fwd: functions returning arrays
>
>
Hi
Perhaps I am confused, but is it not possible to return arrays in PHP?
Example:
function getArray() {
$ret = array('hallo','you');
return $ret;
}
$r = getArray();
for( $i=0;$i < count($r); $i++)
echo "$r[i]";
Does not work! The array shows 2 Elements, but they are
3 matches
Mail list logo