php - Check if URl get parameter exists -


my cms generates parameter this: domain.com/group?page_n531=2

the usual code is:

if (isset($_get["id"])) {  } 

but cms changes 'id' every page, want check, if parameter exist, dont need 'id'. can guys me that?

thanks.

the numeric part of parameter id of news module.

it generated like: $id = 'page_n' . $this->id;

so code (assuming in mod_newslist.html5 template) should read:

if (isset($_get['page_n' . $this->id])) {     // yeah on page in pagination. } 

if should happen in template news_full.html5 or other of partial templates, out of luck, when hoping generic approach, id of calling module not available within there.

in cases have create different news_*.html5 templates each list module , assign news template said module. within there can hard code module id then.


Comments