web_singer wrote:
I am using an array to create a menu and the code to change an image on
mouseover.
I would also like to change some text on mouseover.  While i can do it using
a swtich in javascript it requires that I hard code all the different
options in.  My whole reason for using the php in the first place was to
avoid having to hard code anything at all.
Does anyone have an idea how I can get the text portion to also use my
variable?

This is what i have so far...
<?
$site_pages = array("pageone", "pagetwo", "pagethree" );

$site_text = array("this is text one", "this is text two", "this is text
three" );
<snip>

Why not just use a multi-dimensional array?

$site = array (
        1 => array (
                "page" => "pageone",
                "text" => "this is text one"
        ),
        2 => array (
                "page" => "pagetwo",
                "text" => "this is text two"
        ),
        so-on, and so-forth...
)

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to