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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:05:13+00:00 2026-05-28T03:05:13+00:00

I am sending a CSV list to the server within the url. It is

  • 0

I am sending a CSV list to the server within the url. It is a list of songid’s:

var $array = [];


        oTable.find('td').each(function(){

            $songdata = $(this).data('data');
            $songid = $songdata.songid;

    //The next line is the variable I need to also send along with each songid
            $duration = $songdata.duration;


            $array.push($songid)



            });

This results in ‘24,25,32,48,87’ being sent to the server.

I then use the following in my php script to convert it into an array:

 $songs = $_GET['songid'];

 $songarray = explode(",", $songs);

This works great, I can access the data properly and all is well.

However I now have the need to add another property to each of the songid’s. As seen above, I need to add the $duration variable to the data sent and be able to convert it into an array server side. (or alternatively construct the actual array client side would be fine also)

How would I go about this?

  • 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-28T03:05:13+00:00Added an answer on May 28, 2026 at 3:05 am

    You could use this to encode your array into JSON:
    http://www.openjs.com/scripts/data/json_encode.php

    And then send that String to your backend where you can unpack it with this:

    $yourarray = json_decode($string)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sending Parameters to the Function called by a thread in C#, this is my
My WCF service involves the sending of a dataset (in csv format) data between
M sending the parameters from the jsp page, the code is <s:url id=url action=searchAction>
when sending packet to openfire using Smack, i get error remote-server-not-found(404) . Can anyone
A customer is sending me a .csv file where the line breaks are made
I am using this code: File myDir = new File(getApplicationContext().getFilesDir().getAbsolutePath()); try { Log.i(CSV Testing
I have data in a MySQL database. I am sending the user a URL
i am sending a csv file as a header and i want to use
Sending a message from the Unix command line using mail TO_ADDR results in an
Sending a mail through my windows application to a person asking him to log

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.