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 8358727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:53:38+00:00 2026-06-09T10:53:38+00:00

I have small problem with prepare table. Generally I usually prepare this table in

  • 0

I have small problem with prepare table.
Generally I usually prepare this table in PHP:

array(2) {
  ["function"]=>
     string(14) "saveStats"
  ["data"]=>
  array(10) {
     ["id"]=>
         string(28) "6079f20ac3_1344412683016_427"
     ["stat"]=>
         array(2) {
             [461]=>
                 string(572) "1834!:!606113;2636701;2532259;8615557991;"
             [462]=>
                 string(664) "947679;1976657;1457921;1302869;2966923;2361071;6876943;5641369;560761;3469061;5438071;9646643;8575873;339307;9652169;2581441;5158451;6210209;6062971;2815237;3396139;2527643;2502571;7882529;536729;1171073;8825407;351427;1845373;8828471;1099463;6653011;5433293;86027;8258377;6748487;5237059;8006827;3996193;117389;7449523;9847147;3476761;7073981;7491493;1603837;8972801;699401;3354649;8120317;3405823;8545499;2672701;1373363;2397077;3417523;8772983;157999;6294929;6024589;6760669;5923937;4560691;8324143;824477;3575549;1372559;986287;4860203;5774323;1832353;4198973;3639841;9179101;718337;4949353;5745787;1608041;8169241;46549;3272723;7622267;"
    }
    ["userAgent"]=>
        string(67) "Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1"
    ["ip"]=>
        string(3) "::1"
    ["referer"]=>
        string(4) "Brak"
    ["limit"]=>
        int(1)
  }
}

Data in [“stat”] can be array 10 or 2 end each of them have “random” number (look at [461][462] etc)

This data I must later put to JSON (I use newtonsoft.Json).

How I can prepare this object in C# ?

  • 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-09T10:53:39+00:00Added an answer on June 9, 2026 at 10:53 am

    Try this (.NET 4) (see below), the only issue are the columns 461 and 462, C# does not allow variable names starting with a number (I’ve renamed them to n461 and n462) but it’s easy to compensate for this using newtonsoft.Json see similar question here

    var table =  new {
        function = "saveStats",
        data = new  {
            id = "6079f20ac3_1344412683016_427" , 
            stat = new List<dynamic>  {
                              new {  n461 = "1834!:!606113;263..." },
                              new {  n462 = "947679;1976657;14..." }
                            },
            userAgent = "Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1",
            ip = "::1",
            referer = "Brak",
            limit = 1
        }
     };
    

    I’ve used dynamic and anonymous classes but you could declare “real” classes of course depending on your needs. (if you are using .NET 3.5 or earlier this is a must)

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

Sidebar

Related Questions

I have a small problem, I want to load data from a PHP file
I have small problem with mysql. I have data in table and I want
i have small problem with inserting data into my table events +-------+----------+------+-----+---------+----------------+ | Field
I have a small problem in my code. I'm using fetch_assoc to get data
i have a small problem with a jquery click trigger. in my index.php i
I have small problem with simple code. This code is working properly on x86
i have small problem i.e. their is one celltable with lot of data it
I have small problem with name spaces in php 5.3. I've made declaration for
I am newbe to php. I have small problem to compare dates in php.
I have small problem. I've coded a full website in php using CodeIgniter framework.

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.