Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 19:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] Dynamic Var in array [Fast response plz]

Discussion on [PHP] Dynamic Var in array [Fast response plz] within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
[PHP] Dynamic Var in array [Fast response plz]

[syntax=php]
$tpl = "";
$query2 = $db->SQLquery("SELECT * FROM character.dbo.user_character_achievements WHERE character_no = 'C12090560000000127' ");
$data = $db->SQLfetchArray($query2);

$query3 = $db->SQLquery("SELECT * FROM account.dbo.user_achievements ");
while ($achie = $db->SQLfetchArray($query3))
{
$id = "achid_".$achie['id'];
$done = $data[$id];
$tpl .= "<tr><td><img src='achimg.php?done=".$done."&triggers=".$achie['triggers']."&finished_triggers=".$done."&name=".urlencode($a chie['name'])."&desc=".urlencode($achie['desc'])."&id=".$achie['id']."'></td></tr>";
}

[/syntax]


Ok code may seem crappy but i CANNOT change it


here is what the prob is

I need to have a value from the database $data['achie_xx']
the XX refers to $achie['id'], so my question is how to i get $data['achie_1'], $data['achie_3'],$data['achie_9'] ?


thx
janvier123 is offline  
Old 09/16/2012, 15:12   #2
 
Mikesch01's Avatar
 
elite*gold: 203
Join Date: Sep 2007
Posts: 732
Received Thanks: 190
it's already in the code...the variable you need is $done. $done contains the string achie_$id, so while is giving you in every loop the resulted id you need.
Mikesch01 is offline  
Old 09/18/2012, 08:56   #3
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
Thx for that
janvier123 is offline  
Reply


Similar Threads Similar Threads
FAST!FAST!FAST! Biete 25€ PSC Suche e*Gold | gebe first | FAST!FAST!FAST!
10/02/2011 - elite*gold Trading - 1 Replies
^regelt. Sofortkauf 1200e*Gold | offline erworben. Sonst bitte vorschläge per pn oder im Thread. Es wird nicht via treasure gehandelt, von wegen log. Bei trusted leuten gebe ich first. Alles wird gefilmt, versteht sich. rgrds
In Response
04/29/2009 - Dekaron - 1 Replies
DDevil174 stated that "we" as botters are ruining the game. You fail epicly in this statement it is not us it is the dil sellers and they are on every major MMO not just 2Moons. If for any reason this gets locked can a Mod state why before he/she does so.
SV RESPONSE PLZ
03/18/2007 - Conquer Online 2 - 5 Replies
hi, 3 weeks ago i download SV, i didnt crack it, just run it, and use it, and it works fine!! i know this is weird, but i cant crack SV well, the SV wroks fine 3 weeks, but now when i put the acc and pass and click start it sais: logging logging logging logging logging like 20 times, and nothing...



All times are GMT +1. The time now is 19:19.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.