Function Parameter converted from string to array when passed
| From: | Michael Motal | Date: | Mon, 05 Nov 2001 23:28:07 +0000 |
| Subject: | Function Parameter converted from string to array when passed | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73523@lists.php.net to get a copy of this message | ||
Ok, I've tried finding the answer online but have had no luck. I have a
main page with this snippet of code:
<?php
$current_page = substr($PHP_SELF,5);
echo("BEGIN MAIN Current Page: " . $current_page . "<BR>");
require_once("./library/gui_coding.php");
$filename = "./includes/top_banner.html";
$top_banner = (fread(@fopen($filename, "r"),filesize($filename)));
$menu_html = create_menu($current_page); # strip off the leading /dev/
of the page name
...
which calls the create_menu function with a STRING parameter $current_page.
However, when the function gets it, it is suddenly an ARRAY. A sample of the
output:
BEGIN MAIN Current Page: main.html
BEGIN create_menu with current_page=Array
Begin getItemMenuLevel with site= stryxus current_item= Array
...
I've tried settype() and cast and in both instances it still was interpreted
by the called function as an array.
How can I force the parameter to be passed as a STRING instead of being
converted to an ARRAY?
-Michael