Php offset problem

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

labrocca

Top Member
Impact
555
PHP:
        $ranknames = explode(',',setting('article_ranknames'));
        $count = 1;
        while (list(,$name) = each($ranknames))
        {
        	$name = trim($name);
            $template->ASLStatement($name . 'rank');
            if ($article['rank' . $count] != '-1')
            {
            	$template->ASLCondition($name . 'rank');
            }
            $vars2[$name . 'rank'] = $article['rank' . $count];
			$bar = imagecreatefrompng(setting('documentroot') . _MISCFOLDER . 'rankbar.png');
         	$width = imagesx($bar);
         	$height = imagesy($bar);
         	//$resized = round(($width / setting('article_rankingtotal')) * $article['rank' . $count]);
         	$resized = round((($width / setting('article_rankingtotal')) * (setting('article_rankingtotal') * $article['rank' . $count])) / setting('article_rankingtotal'),0);
         	$vars2[$name . 'rank_bar'] = '<img src="' . _SITEFOLDER . _MISCDIRECTORY . '/rankbar.png" width="' . $resized . '" height="' . $height . '" alt="' . $rank . '" />';

        	$count++;

        }


That code is giving me offset problem where I believe the $name array is the culprit. The code works on php4 but not php5 and it's a problem since host just updated (pricks).

Any help is greatly appreciated.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back