Hi,
I'm looking for some help to solve my problem. Let me explain.
I have a collection of over 100 press articles. Contents of each article is stored in one DB field called body. Recently, I have come to an idea to embed an advertisement into this contents. However, in order to do this I'd have to split each article into 3 parts: intro, main part and ending. Advertisement would appear somewhere between intro and main.
Original article:
aaaaaaaaa
bbbbbbbbb
cccccccccccc
Desirable article:
aaaaaaaaa
//advertisement//
bbbbbbbbb
ccccccccccc
Then I came to think there might be a work around to avoid changing such a big amount of text. I put the advertisement into
an include file e.g. advert.php. In the database, in the body of the article i wrote: include("advert.php");
In the php file:
$body = $row["body"];
eval($body);
echo $body;
As you may guess nothing happens
After connecting to DB I get the contents of the article
and the error: Parse error: parse error, unexpected T_STRING
Do I really need to split over 100 article to get my advertisement appear between the lines?
witold