I have a php variable containing some special characters, inside a Codeigniter 3 controller:
page_url = 'search=' . $expression . '&page';
In a template, I use this variable:
<a href="<?php echo $page_url; ?>"></a>
In the in the browser I see the characters mentioned above in this form:
posts/search?search%3Dharum%26page=2
The =
sign turns to %3D
, "&" to %26
.
I tried page_url = urldecode($page_url);
but it does not work.
How do I keep the original characters?