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
Share on other sites

Can I get the plonker of the day award?

 

It is working, but because its valid xhtml markup, it doesnt appear, only when you look at the source.

 

Should have known really, as thats the effect I was going for lol  :-[

 

L8rs

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.