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

  • SEARCH
  • Home
  • 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 8748531
In Process

The Archive Base Latest Questions

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

Here is a small Java Code Snippet. ConfigData[] cd = new ConfigData[1]; cd[0] =

  • 0

Here is a small Java Code Snippet.

ConfigData[] cd = new ConfigData[1];
cd[0] = new ConfigData();
byte[] tmpbyte ={1,(byte)0x01};
cd[0].settmpdata(tmpbyte);

“ConfigData” is my custom Type (int, Byte Array).

In my last thread i found the tip how to Build / work with a “ByteArray” in php.
But this seems to be a question of the structure of those objects / array.

So..
How can i depict that in PHP.

  • 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:32:27+00:00Added an answer on June 13, 2026 at 12:32 pm

    I hope that this can make some guidelines for you, in the terms of what you can do in PHP, and in a relation to your code snippet (the code is tested):

    <?php
    
    // define class
    class ConfigData
    {
        var $intVal;
        var $tmpData;
    }
    
    $cData = new ConfigData();             // new ConfigData instance
    $array[0] = $cData;                 // put it in a single element array
    $array[0]->intVal = 5;                 // assign an integer to intVal
    $array[0]->tmpData = array(1, 1, 2);  // assign an array of whatever to tmpData
    
    foreach($array[0]->tmpData as $val)   // iterate through assigned array
        echo $val." ";                     // print array item (and append " " )
    
    ?>
    

    Now, you might also want to check how byte manipulation in PHP is achieved. I suggest you to do a little Google search, and maybe check the official manual. You question was not specific enough, so I can’t say more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm porting a small snippet of PHP code to java right now, and I
Here a small piece of code for testing and explain the problem. I have
here is a small peice off code that i wrote. But I am not
HI here is a small code i picked it from the sample code of
I have the following code in Java: public class ServerInfo { int serverId; int
I have the created a sample Lucene code snippet which indexes a small file.
Looking for some help for a small display bug. Here is a code sample
I have just started learning java, and know only a small amount of code,
i am trying to code a small XMPP gtalk client in java. I know
Here is small example: A <- c(1,1,1,1, 0, 0, 0, 2,2,2) B <- c(1,1,1,1,

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.