-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 13 February 2002 22:55, Erik Price wrote:
> Can anyone give my puny mind an explanation as to why the following
> function only returns the value "Array" ?
>
> # ===============================================================
> # get_current_page_name()
> # ---------------------------------------------------------------
> # Returns the current document
> # Arguments
> # -----------
> # no arguments
> # ===============================================================
>
> function get_current_page_name()
> {
> $current_page_name = explode("/", $_SERVER['PHP_SELF']);
> $current_page_name = array_slice($current_page_name, -1);
> return $current_page_name;
> }
>
from the manual:
array array_slice ( array array, int offset [, int length])
array in, array out.. it wouldn't suprice me if when you changed the return
into
return $current_page_name.'';
it would become a string again.
Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8auY+Um/iHoGGwKMRAqaDAJ4v4zT+l4qvJN+Rei1zx7fdxrWV4wCgoly2
BoZqmifb7o6kaO6RzrZp0NU=
=NjIn
-----END PGP SIGNATURE-----
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php