Those are htmlentities, Code Igniter is somewhere escaping the parameter (or you're doing it inadvertently). To get the correct value you can use html_entity_decode
.
$ php -r 'var_dump(html_entity_decode("tasse(s)"));'
string(8) "tasse(s)"
سؤال
I'm sending an string via an url.
The string I wrote is :
"tasse(s)", size : 8
When i transmit it from the url, it encodes the string, so it's like that :
string(16) "tasse(s)"
and If I get more info, its :
string(16) "tasse(s)"
So, after receiving my parameter via url, it's possible to get back :
"tasse(s)", size : 8
Because "tasse(s)", size : 8 exist in my Mysql BDD, but when I compare it with "tasse(s)", size : 16, it consider they are not the same ..
Someone have an solution for that ?
Code :
{assign var="myUri" value=site_url("admin/deleteRowInRecipe/"|cat:$recette[$i]->id|cat:"/"|cat:$ingredient|cat:"/"|cat:$quantite|cat:"/"|cat:$unite)}
<a href="{$myUri}"><input type="button" value="Supprimer"></a>
In my console firefox/chrome :
<a href="http://localhost/CodeIgniter_RECETTE-copie/admin/deleteRowInRecipe/52/curcuma/1/3/tasse(s)">
<input type="button" value="Supprimer"></a>
<br/>
المحلول
Those are htmlentities, Code Igniter is somewhere escaping the parameter (or you're doing it inadvertently). To get the correct value you can use html_entity_decode
.
$ php -r 'var_dump(html_entity_decode("tasse(s)"));'
string(8) "tasse(s)"