php - Replace %26 with ampersand -


every piece of research refers replacing ampersand %26, when in fact want replace %26 in url ampersand.

at moment each time pass url under command %26 back.

for example code passing in form follows

    <form method="get" action="<?php echo $server['php_self'];?>">      <input type="text" id="stg" name="stg" size = "25" value="<?php echo '?pn=' . $sub1 .'%26'.$jrny.'&subject='.$subject.'&pn2='.$sub1. '&arc='.$sess.'&table_id='.$table_id; ;?>" /> 

when try string replace or rawurlencode functions still end %26. doing wrong?

thanks

you can use urldecode function:

print_r(urldecode ( "%26" )); 

will print out:

& 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -