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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -