hello. i am a new learner. i build some program that able to read .doc file and pass them to Cache database. i've done the passing part. but the problem is, how can i diffrentiate between paragraph and table content?

for example, i have Section A as a title and a table inside the section.

currently, i just get the table content and send it as array to Cache Database. (ex. array(1,2))

but i want to include the element Section A in the array.

it might look like this:

array(1)="Section A"
array(2,1,1)="Name: "
array(2,1,2)="Terry"
array(2,2,1)="Age: "
array(3)="Section B"
.
.
.

i like to set an ID for each element.

Recommended Answers

All 2 Replies

I don't understand what the meaning of the value inside the array parenthesis? It looks like if there are more than 1 value inside the parenthesis, it is a table.

array(1)="Section A"
That is not a valid method call. You can not assign a value to the call to a method. array(1) is a call to a method (the ()s)
Do you mean to make an array reference? Then use []:array[1]="Section A"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.