Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8750595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:53:41+00:00 2026-06-13T12:53:41+00:00

I’m sure my title wasn’t really that helpful. What i’m trying to do is

  • 0

I’m sure my title wasn’t really that helpful. What i’m trying to do is this, I have an array with names in them. I also have a dynamic array which is generated with a foreach from an external xml file. What I want to do is if a name(s) are found then echo each one out. I am still working on my PHP skills but I am at a loss at what to do to get this working the way I want it. I’ve searched for hours trying to find something that would work but nothing. I’m probably not searching right.

Here is the code that i’m trying to do.

// This just gets how many players ore on the US team
$serverplayer = $gameME_sdk_object->client_api_serverinfo("".$ip."/players/usarmy");
        foreach($serverplayer['serverinfo'][0]['teams'] as $mainserver) {
            if($mainserver['name'] == "usarmy") {
                $dacount = $mainserver['count'];
            }
        }
        if($dacount >= 1)
            // Begins Admin List/Count
            $admins = array("INFIDEL_HARE", "Romania191", "mardog104", "INFIDEL_JIHAD", "stvnsng", "HellKnightFire", "McThump", "INFIDEL_JByrns93", "INFIDEL_ALPHA", "s0ck37", "Zepppster", "xRingmasteressx", "FreeeKillz", "smokert", "Ccls2", "INFIDEL_GRIF", "cuzco2585", "Prophet731", "KittensDrunk", "Rexperience-EF", "Whickerbasket", "InfamousHoole", "Cruz_5326", "-Grimreaperx9-", "JoeyT2");
            foreach($serverplayer['serverinfo'][0]['players'] as $admname) {
                $Alist[] = $admname['name'];
                if(in_array($Alist, $admins)) {
                    $adminlist = $admname['name'];
                    $countAlist = count($adminlist);
                }
            }
            // Ends Admin List/Count
            // Everything below is just the data
            echo '<div class="four-columns six-columns-tablet twelve-columns-mobile">';
            echo '<pre>';
            echo $adminlist;
            echo '</pre>';
            echo "<div class=\"table-header\">US (".$dacount.")</div>";
            echo '<table class="table responsive-table" id="scoreboard">';
            echo '<thead>';
            echo '<tr>';
            echo '<th scope="col" width="2%">Sq</th>
            <th scope="col">Name</th>
            <th scope="col" width="2%">K</th>
            <th scope="col" width="2%">D</th>
            <th scope="col" width="5%" class="hide-on-mobile hide-on-tablet hide-on-mobile-portrait">Cheat Meter</th>';
            echo '</tr></thead>';
            echo '<tbody>';
            foreach($serverplayer['serverinfo'][0]['players'] as $player) {
                echo '<tr>';
                if ($player['team'] == "unassigned" Xor $player['team'] == "None") {            
                    $team = "<small class=\"tag green-gradient glossy\">Joining</small>";
                }
                echo "<td class=\"low-padding\">".ucfirst($player['squad'])."</td>";
                echo "<td class=\"low-padding\"><a href=\"http://battlelog.battlefield.com/bf3/user/".$player['name']."\" target=\"_blank\"><img src=\"./img/battlelog.png\" alt=\"Battlelog Profile\" width=\"16\" height=\"16\"></a>&nbsp;".$player['name']."<span style=\"float: right\">".$team."</span></th>";
                echo '<td>'.$player['kills'].'</td>';
                echo '<td>'.$player['deaths'].'</td>';
                echo "<td><a href=\"http://panel.dev.adkgamers.com/?p=" . $player['name'] . "&id=cheatometer\"target=\"_blank\">Check</a></td>";
                echo '</tr>';
            }
            echo '</tbody>';
            echo '</table>';
            echo '</div>';

How would I go about doing this? If anyone knows how to or understands what i’m trying to do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:53:43+00:00Added an answer on June 13, 2026 at 12:53 pm

    You need to change following your code

     foreach($serverplayer['serverinfo'][0]['players'] as $admname) {
                    //$Alist[] = $admname['name']; // there is no need to take this array
                    if(in_array($admname['name'], $admins)) {
                        $adminlist[] = $admname['name']; // take this array because may be more than one admins are there
                        $countAlist = count($adminlist);
                    }
                }
                // Ends Admin List/Count
                // Everything below is just the data
                echo '<div class="four-columns six-columns-tablet twelve-columns-mobile">';
                echo '<pre>';
                echo implode(",",$adminlist);// you can print all admins as comma separated
                echo '</pre>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a small JavaScript validation script that validates inputs based on Regex. I
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have an array which has BIG numbers and small numbers in it. I
I know there's a lot of other questions out there that deal with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.