I will show the code and some of the solutions I have tried.
Expand|Select|Wrap|Line Numbers
- ...
- while($state=$out_sql->fetchrow_array){
- $stateoptions.="<option Value=\"$state\">$state</option>";
- $i=2;
- $countyFill.="subcat$state=new Array()\n";
- $countyFill.="subcat$state\[0\]=new Entry(\"\",\"- Select a County -\")\n";
- $countyFill.="subcat$state\[1\]=new Entry(\"allcounties\",\"Select all Counties\")\n";
- .......connect to the database...........
- while($county=$out_sql->fetchrow_array){
- $countyFill.="subcat$state\[$i\]=new Entry(\"$county\",\"$county\")\n";
- $i++;
- }
subcatMD=new Array()
subcatMD[0]=new Entry("","- Select a County -")
subcatMD[1]=new Entry("allcounties","Select all Counties")
subcatMD[2]=new Entry("Harford","Harford")
subcatMD[3]=new Entry("Howard","Howard")
subcatMD[4]=new Entry("Montgomery","Montgomery")
subcatMD[5]=new Entry("Prince George's","Prince George's")
subcatMD[6]=new Entry("Worcester","Worcester")
[/RESULT]
This calls an error Expected ')'
------------------------------
I tried adding code to replace the ' with the \'
$county =~ s/\'/\\\'/;
but then my RESULT is
subcatMD[5]=new Entry("Prince George\'s","Prince George\'s")
Which still doesn't work.
-------------------------------------------------------
I suggested just removing the ' and making it Prince Georges but my boss nixed that. I guess the folks in Prince George's county care about such things.
I tried subing ' for the ' but got "Prince George's"
I tried all sorts of other things but still have had no luck.
I would appreciate any ideas you might have.
Thanks,
Brita