/    Sign up×
Community /Pin to ProfileBookmark

Dynamic Content

Does anyone know how to display dynamic content (banner ad) in the middle of dynamic content (text/article?)

For example – you are familiar that most news sites place advertisments in the middle of their articles – that is exactly what I’m trying to do.

In my article, I’ve placed PHP tags however it’s being treated as plain text and not PHP.

Example:

Dynamic text being outputted from the database:

By early May, the partners had gutted the first floor and contractors had begun replacing the building’s mechanical equipment, installing flooring in several locations, uncovering and restoring numerous windows, insulating and drywalling large expanses throughout the building.

— Advertisement —
<? php echo myAdvertisement ?>

The front is being cleaned and an awning should be in place next week. Jansen said he has looked at old photos of the building and wants to recreate the original look.

End Example

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@SpectreReturnsOct 11.2005 — Problems (fixed in bold):

[b]<?php[/b] echo [b]$[/b]myAdvertisement[b];[/b] ?>

Also check that you

a) have PHP installed

b) are parsing the current file as PHP
×

Success!

Help @cwilkey spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...