note 50686 deleted from function.preg-replace by tularis
| From: | tularis@php.net | Date: | Sun, 18 Jun 2006 13:25:13 +0000 |
| Subject: | note 50686 deleted from function.preg-replace by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-114308@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Here you have very usefull script to convert links to robots friendly, and read parameters in your
page. I tested this in the site http://www.proanglo.com
You can use links in you page in such form:
http://www.example.com/file.php/s1=1/s2=2/s3=3
OR
http://www.example.com/file.php/s1=1,s2=2,s3=3
Your script:
<?php
$adres = $_SERVER["PATH_INFO"];
$res = preg_replace('@(\w+)=(\w+)@e', '$\\1="\\2";', $adres);
var_dump($s1, $s2, $s3);
?>