Query Master Query Master - 6 months ago 79
PHP Question

Need help get URI Segment using Yii Framework

How segment works in Yii Framework?

Example....

http://myblog.com/index.php/controller/method/id/5


How to get 5?

Without params are possible in Yii like Codeigniter
$product_id = $this->uri->segment(4);

Answer

You can get it by

$_GET['id'];

It goes like this....

controller/method/param1/value1/param2/value2.... so far so forth