I'm just starting in php, although I have a little programming experience in
other languages, but only on a surface level. I'm hoping someone can help me.
I have a multidimensional array that I want to pull information from on a
bunch of pages.
$county = array (
array (
key=>"adams",
name=>"Adams",
govwebsite=>"http://www.co.adams.wa.us/default.asp"
demwebsite=>"" ),
array ( name=>"Asotin",
I'm trying to write the php script for the pages to identify the sub array
by the filename, pull the rest of the information out of the array into
variables, and then use those variables to write the page. I've searched
and tried a bunch of things, and nothing is working. Here is what I have:
<?php
include("countiesarray.inc");
$path = __FILE__;
$filename = basename ($path,".php");
foreach ($county as $key => $ArrayRow)
{
if ($ArrayRow[0] == $filename)
{$countyname = $ArrayRow[name];
$govwebsite = $ArrayRow[govwebsite];
$demwebsite = $ArrayRow[demwebsite];
};
);
include ("header.html");
include ("title.html");
if ( $govwebsite != "" ) { include ("countyweb.html"); };
if ( $demwebsite != "" ) { include ("countydemweb.html"); };
include("../navigation.html");
include("../copyright.html");
?>
The error I get is Parse error:
parse error in /home/calador/public_html/wapolitics/counties/adams.php on line 12.
Line 12 is the end of the foreach loop. Can someone tell me what I'm doing wrong?
Chad Lupkes
ch********@earthlink.net