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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:29:36+00:00 2026-05-26T12:29:36+00:00

Please see my DEMO and answer my question: why date in values html on

  • 0

Please see my DEMO and answer my question: why date in values html on offset 2 not as date and it is a number?

DEMO: http://codepad.viper-7.com/r9FYnb

$data = array();
$data_1 = $_POST['data_1'];
$static = $_POST["static"];
foreach($static as $idx=>$val){
    $data[] = array(
          'data_1' => json_encode(Array($data_1[$idx*2],$data_1[$idx]*2+1)),
          'static' => $static[$idx]
           );
}

This is output:

Array
(
    [0] => Array
        (
            [data_1] => ["2011\/8\/02",4023] **//4023 !?**
            [static] => 12
        )

    [1] => Array
        (
            [data_1] => ["2011\/8\/09",4023] **// 4023!?** 
            [static] => 34
        )

    [2] => Array
        (
            [data_1] => ["2011\/8\/16",4023] **// 4023 !?**
            [static] => 56
        )

)
  • 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-05-26T12:29:36+00:00Added an answer on May 26, 2026 at 12:29 pm

    I’m not certain what you are trying to do here, but I see an inconsistency between how you manipulate $idx

    'data_1' => json_encode(Array($data_1[$idx*2],$data_1[$idx]*2+1)),
    //                              -----^^^^^^^^-------^^^^^^^^^^^^
    

    For the second offset, perhaps you intend to modify $idx inside the []

    'data_1' => json_encode(Array($data_1[$idx*2],$data_1[($idx*2)+1])),
    //                               ---------------------^^^^^^^^^^^^
    

    Sample output after modifying your demo:

    Array
    (
        [0] => Array
            (
                [data_1] => ["2011\/8\/02","2011\/8\/08"]
                [static] => 12
            )
    
        [1] => Array
            (
                [data_1] => ["2011\/8\/09","2011\/8\/15"]
                [static] => 34
            )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

please see the demo below : http://www.templateaccess.com/demos/walkin/ i bought this template and really really
Important : Please see this very much related question: Return multiple values in C++
Please see: http://jasondaydesign.com/masonry_demo/ and click on the movemaine.com image I would like my transitions
first, please see the blog as the link showed below: http://blogs.nitobi.com/joe/2008/10/17/phonegap-now-for-android/comment-page-1/#comment-12918 the author made
I need some help with this accordion. Please see the demo here. http://jsfiddle.net/a36RL/ $(document).ready(function()
Im using this plugin clueTip http://plugins.learningjquery.com/cluetip/demo/ See the first example where you hover your
Please see the demo . How come the li 's do not wrap to
Please see here for a related question . However, char goes to 0xffff (or
Please see MSO question A long list of possible duplicates — C memory allocation
please see: demo $(#stdout).height() return 18px I want to get the reality height (

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.