Jump to content

Recommended Posts

Hello All,

 

Long time since my last question...

 

Each multidimensional array has 100 values. I wish to put each array into its own column and each value in to 100 different rows in the that column.

 

At the moment i am getting "Array[1]" etc... put into the mysql database.

 

My code is...

 

for ($i=0; $i<=99; $i=$i+1)
{
mysql_query("INSERT INTO tophotdeals (title, deal_link, mobile_deal_link, deal_image, description, submit_time, hot_time, poster_name, temperature)
VALUES ('$title[0][$]', '$deal_link[0][$i]', '$mobile_deal_link[0][$i]', '$deal_image[0][$i]', '$description[0][$i]', '$submit_time[0][$i]', '$hot_time[0][$i]', '$poster_name[0][$i]', '$temperature[0][$i')");
}

 

In reading about, i don't think i want to use serialize, it looks like i want to use implode, but i cant find an example with many arrays and its all getting a bit confusing.

 

I welcome any help!

 

 

Thanks

 

Gary

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.