Sunday, June 5, 2011

Re: URL Params - Adding more value's for a key?

try something with base64_encode and serialize, just like this, when you create a link


$this->Html->link(__('Link name'),
array(
'plugin' => null,
'controller' => 'yourcontroller',
'action' => 'youraction',
'yourkey' => base64_encode(serialize(array('value1', 'value2', 'value3')))
)
);

and you can get the values with

$values = unserialize(base64_decode($this->params['named']['yourkey']));


--
Lep pozdrav, Tilen Majerle



2011/6/5 Shaz <shazamjad@gmail.com>
I know this is possible:

site.com/controller/action/key1:value/key2:value etc

Is there a way to add more than value to a key? For example:

site.com/controller/action/key1:value1|value2|value3/key2:val1|val2/

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: