Re: [PHP] Finding split points in an article for inserting ads

2011-02-16 Thread Gerardo Benitez
I think you can do it any of both, is only a matter of taste. Gerardo. On Wed, Feb 16, 2011 at 1:26 AM, Tamara Temple wrote: > > > Dear list, > > I want to extend the original question to a discussion about the relative > merits of doing this within PHP vs. doing it afterwards in JavaScript. I

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Tamara Temple
On Feb 15, 2011, at 4:32 PM, Brian Dunning wrote: Yes, thanks, what I'm looking for is how to do that. On Feb 15, 2011, at 1:38 PM, Simon J Welsh wrote: Assuming you're only using tags, count the number of opening tags, divide by three. First ad block goes after the round($amount/3)-th

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread David Robley
Brian Dunning wrote: > Yes, thanks, what I'm looking for is how to do that. > > On Feb 15, 2011, at 1:38 PM, Simon J Welsh wrote: > >> Assuming you're only using tags, count the number of opening >> tags, divide by three. First ad block goes after the round($amount/3)-th >> , second ad block g

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Brian Dunning
Yes, thanks, what I'm looking for is how to do that. On Feb 15, 2011, at 1:38 PM, Simon J Welsh wrote: > Assuming you're only using tags, count the number of opening tags, > divide by three. First ad block goes after the round($amount/3)-th , > second ad block goes after the round($amount/3*2

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Robert Cummings
On 11-02-15 04:03 PM, Brian Dunning wrote: Hey all - I've got long articles, the HTML for which comes out of MySQL. Works great. I want to split it up so that I can insert ad blocks at various points within it. The articles are all pretty long but they're of variable length. I want to chop th

Re: [PHP] Finding split points in an article for inserting ads

2011-02-15 Thread Simon J Welsh
On 16/02/2011, at 10:03 AM, Brian Dunning wrote: > Hey all - > > I've got long articles, the HTML for which comes out of MySQL. Works great. I > want to split it up so that I can insert ad blocks at various points within > it. The articles are all pretty long but they're of variable length. I w