URL param's -> html equivs
Posted: Wed Jun 14, 2006 1:59 pm
My php script will determine if certain parameters need to be added to a link and add them if necessary with either the ? or & depending on if other parameters are included as well.
So my question is:
Do I use the HTML equivalents in my code to produce the desired URLs w/ parameters??
Ex:
Is it okay to insert the ? or & directly or should I use thier html equivalents like so:
So my question is:
Do I use the HTML equivalents in my code to produce the desired URLs w/ parameters??
Ex:
Code: Select all
if( .. need to use ? )
$paramPrefix = '?'
else
$paramPrefix = '&';
$parameter = 'sort=ascending';
$linkURL = $url . $paramPrefix . $parameter;Code: Select all
$paramPrefix = '&';