Jump to content

Cannot use string offset as an array


weeder

Recommended Posts

I get this error Fatal error: Cannot use string offset as an array in /home/domain/public_html/NCADM/CatDetails.php on line 52

 

Server is on php5 can anyone help please, I am very green

 

first part of code where i believe error is

 

define("RelativePath", ".");

include(RelativePath . "/Common.php");

include(RelativePath . "/Template.php");

include(RelativePath . "/Sorter.php");

include(RelativePath . "/Navigator.php");

  

//End Include Common Files



//Include Page implementation @33-503267A8

include("./Header.php");

//End Include Page implementation



$details = new clsDBNetConnect;

$details->query("select * from category_details");

$mods = "";

while ($details->next_record()){

$mods[$details->f("cat_id")]["field"] = $details->f("field");

    $mods[$details->f("cat_id")]["template"] = $details->f("template");

    $mods[$details->f("cat_id")]["storefront"] = $details->f("storefront");

    $mods[$details->f("cat_id")]["pricing"] = $details->f("pricing");

}

$groups = "";

$details->query("select c.group_id, c.cat_id, g.title from groups_categories c, groups g where c.group_id = g.id");

while ($details->next_record()){

//print $details->f("cat_id");

if (isset($groups[$details->f("cat_id")]))

	$groups[$details->f("cat_id")] .= ", " . $details->f("title");

else

    $groups[$details->f("cat_id")] = $details->f("title");

}

$cattable = " <table border=\"1\" cellspacing=\"1\" width=\"350\">\n";

$cattable .= "  <tr>\n";

$cattable .= "    <TD class=DeepWaterFieldCaptionTD align=\"middle\" width=\"175\"><font size=\"2\">Category Details</font></td>\n";

$cattable .= "    <TD class=DeepWaterFieldCaptionTD align=\"middle\" width=\"75\"><font size=\"2\">Group</font><br>\n";

$cattable .= "    <font size=\"2\">Membership</font></td>\n";

$cattable .= "  </tr>\n";


 

 

Link to comment
https://forums.phpfreaks.com/topic/162374-cannot-use-string-offset-as-an-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.