How would I add an array consisting of multiple rows into a database?

Here's comes my array...

row_1->[0], [1], [2], [3], [4]
row_2->[0], [1], [3], [4]

I don't have a consistent number of "cells" with every row. In most of the examples I've seen, it would appear as though a consistency in data is assumed. If I've got things set up like this:

foreach ($page_display as $page)

{
what am I going to put here to, not only "parse" my info into my insert statement, but also accommodate those places where there's not any data?

}
brucegustPHP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jagadishwor DulalBraces MediaCommented:
You can set default value in your database when it is null like 0.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave BaldwinFixer of ProblemsCommented:
With the 'array' that you have shown, there is nothing to tell a 'foreach' loop that there is any missing data.
0
Ray PaseurCommented:
Please use var_export() and show us the data in that format.  When you do, please post the CREATE TABLE statement for the applicable table, thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.