How to Get data From url value parameter $_GET in PHP -


sorry begginer of php. have url example here: http://example.com?category=software-hardware .actual of category software & hardware using script url above

foreach ( $key $value ) {     $c = array(' ', '&-');     $d = array('-', '');     echo "<a href=\"category/".strtolower(str_replace($c, $d, $value->kategori_laporan))."\" class=\"list-group-item\">".$value->kategori_laporan."</a>";    } 

how data condition url.? sorry, bad using english. want create url category slideshare. please me.! thanks.!

you can fetch like:

$cat = $_get['category']; 

and don't need foreach


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -