Re: How can I change ? to %3F

From: Date: Tue, 05 Aug 2003 22:19:50 +0000
Subject: Re: How can I change ? to %3F
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158364@lists.php.net to get a copy of this message
Hello, This is a reply to an e-mail that you wrote on Tue, 5 Aug 2003 at 23:16, lines prefixed by '>' were originally written by you. > Is it possible to change the ?, :, & and / characters to their > respective > hex(?) values automatically? That is without having to use > str_replace for > each one? Anyone know how? > Chris http://uk2.php.net/urlencode If you want *only* the ?:&/ characters changed then it can be done with a regular rexpression, the e modifier, and the ord(), hex() and strtoupper() functions, post back if you would like an example. HTH David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Free PHP error handling script: www.phpmachine.com/error-handler/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/

« previous php.general (#158364) next »