PHP - Correct syntax for multiple reference/urlencode -
i want multiple urlencode in path. not know how it. quite new in php please help. thank you.
in search_form.php
<td> <a href="items.php?filepath='.urlencode($path).'?name='.urlencode($name)'?type='.urlencode($type)'" onclick="mm_openbrwindow(\'items.php?filepath='.urlencode($path). '\',\'google\',\'width=650,height=500\'); return false;"> <img src="folder-blank-icon.png"> </a> </td>
forget urlencode
. it's easier this:
$url = 'items.php?'.http_build_query(array('filepath'=>$path, 'name'=>$name, 'type'=>$type))
this add &
inbetween each, , it's cleaner , simpler.
Comments
Post a Comment