hi, thanks for giving ideas...
i couldn't able to get your way...
c i am using the following code to display the adverticement in the article page which is fully edited by (based on client requirements)
------Sample CODE --------------------
$string = explode(' ', $string);
$numspaces = count($string);
$frac = (int)($numspaces/($NUMADS+1));
$nth = $frac;
$cnt =0;
while(list($imgurl, $clickurl)= $result->fields ) {
$align = 'align="right" vspace=15 hspace=10';
if (1 == $cnt % 2) {
$align='align="left" hspace=10 vspace=10';
}
if ($info[tid] !=17){//dont add adverts to press releases.
$image[] = '

';
}
$result->MoveNext();
$cnt = $cnt + 1;
$location[] = $nth;
$nth = $nth + $frac;
}
//this is used to count the number of character and set the maximum ads to display in the article -Arivoli
if($NUMADS > $cnt) // this is used to check which one is max whether total banners or available banners
{
$tcnt=$cnt;
}else
{
$tcnt=$NUMADS;
}
//this is used to randomly pick the ads (ie storing all random numbers between 1 and maximum count)/this is used to randomly pick the ads (ie storing all random numbers between 1 and maximum count)
$randomNumbers = array(); // storage array
$randomNumbers=getRandomArray(1, $tcnt,$tcnt);
for ($i = 0; $i < $tcnt; $i++) {
array_splice($string, $location[$i], 0, $image[$randomNumbers[$i]]);
}
//setting maximum ads ends here
/* for ($i = 0; $i < count($string); $i++) {
array_splice($string, $location[$i], 0, $image[$i]);
}*/
$string = implode(' ', $string);
$preformat['maintext']=$string;
if (!empty($preformat['notes'])) {
$preformat['fulltext'] = "$preformat[maintext]
$preformat[notes]";
} else {
$preformat['fulltext'] = " $preformat[maintext]";
}
-------------Sample code ends here --------------------------------------
Note : in the above code $string variable contains the article text....
here how can i give that impression track code.....
i think now you will get clear-cut picture of my probs....
Let me know your feedback and idea....
Thanks ...
:)