HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Programming/Scripts (http://www.howtoforge.com/forums/forumdisplay.php?f=7)
-   -   How do I use PHP to convert a single character into a string of characters? (http://www.howtoforge.com/forums/showthread.php?t=57410)

Padilpi 25th May 2012 08:12

How do I use PHP to convert a single character into a string of characters?
 
I want to use PHP to find any / that is in a variable which can be called via $_GET. This variable is the end part of a document URL. The URL will be fed into Google Document Viewer. However, the embedded document URL should use %2F instead of /. Is it possible to use PHP to say "every time I see /, I replace it with %2F"?

Online Deals India

arifur 5th June 2012 02:23

Url Encoding:
http://php.net/manual/en/function.urlencode.php

Url Decoding:
http://php.net/manual/en/function.urldecode.php

You can find all you need from here.


All times are GMT +2. The time now is 06:12.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.