Jump to content

[SOLVED] Cant assign a var this value?


RecoilUK

Recommended Posts

Hi guys

 

Cant seem to get my head around why this wont work ...

 

public function ParseResult($box, $file, $keys, $result) {

  $html = $this->GetTemplate($file);
  $keycount = count($keys) - 1;
  for ($i = 0; $i <= $keycount; $i++) {
    $datakey[$keys[$i]] = "<DATA:$keys[$i] />";
  }
  print_r ($datakey);
  echo "<BR>";
}

 

While this does ...

 

public function ParseResult($box, $file, $keys, $result) {

  $html = $this->GetTemplate($file);
  $keycount = count($keys) - 1;
  for ($i = 0; $i <= $keycount; $i++) {
    $datakey[$keys[$i]] = "< DATA:$keys[$i] />";
  }
  print_r ($datakey);
  echo "<BR>";
}

 

Its the part in the for loop.

 

Any ideas?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/113097-solved-cant-assign-a-var-this-value/
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.