I want to transmit in my function a division "1/3" but code igniter consider it like a new argument.
For exemple i want to receive "1/3" and "50"
i'm goding /controller/function/division/number but the division is considered like 2 parameters There is a function which can escape it ? I tried url_encode but it not works good.
Send Input on function like this first create as a string like this "1-/-3" or any other chracted
Controller side code like this :
public function yourfuncname($var){
$inputrec = str_replace("","-",$var); //this step gives you 1/3
//other code as per your requirment.
};
On browser side also add some identified chracters in url link,with the help of javascript or jquery. Create input format as "1-/-3"..Then you able to send these value in a single parameter in codeignter.for further processing
Depending on what you are trying to achieve, you may want to pass the vulgar fraction ⅓ as html URL-encoded entity ⅓
try this: url_title(‘1 /3’);
For more details see http://ellislab.com/codeigniter%20/user-guide/helpers/url_helper.html
Or an alternate solution can be:
**encode** the value before passing
$value = str_replace(’=’, ‘-’, str_replace(’/’, ‘_’, base64_encode($value)));
**decode** the value after receiving
$value = base64_decode(str_replace(’-’, ‘=’, str_replace(‘_’, ‘/’, $value)));