Jump to content

Archived

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

HuggieBear

Table function doesn't work...

Recommended Posts

I'm not sure what just happened to this topic, but this code works.

Regards
Huggie

[code]
<?php
function tables () {
  $tablepre = "prefix_";
  $tables = array('settings', 'modules', 'news');
  foreach ($tables as $tablename) {
      $key = "table_$tablename";
      $tablenames[$key] = $tablepre.$tablename;
  }
  return $tablenames;
}

$mytables = tables();

var_dump($mytables);
?>
[/code]

Share this post


Link to post
Share on other sites
hmm, it comes up with no errors for me, what error are you returning?

Share this post


Link to post
Share on other sites
thats funny the forum post  went wrong joker mgallforever


you no that huggiebear was given a reply.

Share this post


Link to post
Share on other sites
I'm not getting an error, I pasted this reply for someone else saying that this code works, but the original post disappeared, so I added this solution as a new topic.

Regards
Huggie

Share this post


Link to post
Share on other sites

×

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.