/    Sign up×
Community /Pin to ProfileBookmark

hi, i cant get to escape “$” in a string using addcslashes…how should i proceed?

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@scragarFeb 15.2005 — the $ doesn't need to be escaped. the only time you will need to escape it is if you are putting it in yourself, in which case you simply put it in single quotes not double quotes:

[code=php]<?
$DS = "bob";
echo "$DS";//writes bob
echo '$DS';//writes $DS
?>[/code]
Copy linkTweet thisAlerts:
@NogDogFeb 15.2005 — Did you try:
[code=php]
$text = addcslashes($text, "\36");
[/code]

?
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYauthorFeb 16.2005 — sry i didnt reply, i didnt get a notification email for your answers...hmm...im a little bit confused...i dont exactly remember why i needed $ to be excaped...but my problem is solved any way...thanks for ur answers both of you!
×

Success!

Help @LiLcRaZyFuZzY 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.18,
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,
)...