/    Sign up×
Community /Pin to ProfileBookmark

Stripping unwanted output

I have this bit of code that I am using first I used the javascript code given by alexa then I added an bit of code from a wordpress plugin and here is what I have

[CODE]<p>
<SCRIPT type=’text/javascript’ language=’JavaScript’ src=’http://xslt.alexa.com/site_stats/js/t/a?url=<?php $values = get_post_custom_values(“link”); echo $values[0];

?>
></SCRIPT></p>[/CODE]

Now the problem is its giving this as a result when ran

[CODE]<SCRIPT type=’text/javascript’ language=’JavaScript’ src=’http://xslt.alexa.com/site_stats/js/t/a?url=[COLOR=”Red”]http://[/COLOR]www.mysite.com’></SCRIPT></p>[/CODE]

What I cant seem to find out or know how to do is remove the [COLOR=”Red”]http://[/COLOR] using a strip command.

Does anyone know a way to get around this?

[COLOR=”Red”]I have it solved now created a new field in wordpress and called it url and added the url without the http:// and changed the ‘link’ to ‘url’ and works perfect[/COLOR]

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @mr_bill 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...