ZiNgA BuRgA
Smart Alternative
Posts: 17,024.1882 Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1887
|
RE: Need help with php
Firstly, the code you supplied is rather illogical and obviously doesn't work...
Secondly, it's very inefficient - you make a query every time you have to format a name - for example, if there's 100 names needing to be formatted, your code queries the database 100 times just to do that.
My method hardly affects speed, but to achieve that, a lot of code edits are needed.
I'll point out some problems with your script, however, I'm not going to provide you with a full solution (since it won't be "good" anyway):
- The query isn't used anywhere
- $uid is not initialized, and means nothing
The rest looks like it will work.
Pirata Nervo Wrote:Updated with a new question as i resolved my other problem.
Also zinga changed the php code i don't know why but its:
$ugroup = $groupscache[$usergroup];
$format = "<span style=\"color:{$userfields['fid5']};\">{username}</span>";
$userin = substr_count($format, "{username}");
not
$ugroup = $groupscache[$usergroup];
$format = "<span style=\"color:{$userfields['fid5']};\">{username}</span>";
$userin = substr_count($format, "{username}");
What???
|
|
07/09/2007 09:10 PM |
|