• +91 9723535972
  • info@interviewmaterial.com

PHP Interview Questions and Answers

Question - How To Protect Special Characters in Query String?

Answer - If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode(): "); print("

Please click the links below" ." to submit comments about TECHPreparation.com:

"); $comment = 'I want to say: "It\'s a good site! :->"'; $comment = urlencode($comment); print("

" ."" ."It's an excellent site!

"); $comment = 'This visitor said: "It\'s an average site! :-("'; $comment = urlencode($comment); print("

" .'' ."It's an average site.

"); print(""); ?>

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners