Array_splice vs. array_slice

From: Date: Fri, 18 Oct 2002 13:37:29 +0000
Subject: Array_splice vs. array_slice
Groups: php.general 
Request: Send a blank email to php-general+get-120504@lists.php.net to get a copy of this message
I'm getting confused between these two functions. Maybe I'm not using it right but, despite the descriptions, they both only really return the one value I'm specifying in the range (offset to length). If I have: $arrayvalues = { "1", "2", "3", "4", "5" }; Both array_spilce($arrayvalues, 2, 1) and array_slice($arrayvalues, 2, 1) seem to return only 3.

« previous php.general (#120504) next »