i have question, how can add variable in current url book.php?action=addressbook i want add book.php?action=addressbook&page=2 how generate hyperlink this, have tried using $_server['php_self'] query string not included in url showing that book.php?page=2 i want append other variables query string please you can use http_build_query(); append more params url $params = $_get; $params["item"] = 45; $new_query_string = http_build_query($params); for instance: $data = array('page'=> 34, 'item' => 45); echo http_build_query($data); //page=34&item=45 or include amp echo http_build_query($data, '', '&'); //page=34&&item=45
what’s difference between $_server['path_info'] , $_server['orig_path_info'] ? how use them? when run print_r($_server) , path_info , orig_path_info not present in array. why not? how can enable them? i have read php manual on them, still don’t understand them. the path_info variable present if invoke php script this: http://www.example.com/phpinfo.php/hello_there it's /hello_there part after .php script. if don't invoke url that, there won't $_server["path_info"] environment variable. the porig_ prefix uncommon. path_info standard cgi-environment variable, , should never prefixed. did read that? (there issues around php3/php4 if invoked php interpreter via cgi-bin/ - hardly has such setups today.) for reference: http://www.ietf.org/rfc/rfc3875
i set value of cells of table iterating through them. ideally access html table array i.e. $("#tbl")[row][col]="5" this not work. $(document).ready(function() { (var row = 0; row < 3; row++) { (var col = 0; col < 3; col++) { $("#tbl").children().children()[row].children()[col].append("sdfasdf"); } } }); this works dont know why!!! i dont understand $("#tbl").children() .children() why need 2nd children why 3rd children not function i.e. children() 1st 2. why is'nt innerhtml not function i.e. innerhtml() $(document).ready(function() { (var row = 0; row < 3; row++) { (var col = 0; col < 3; col++) { $("#tbl").children().children()[row].children[col].innerhtml = "h!"; } } }); if want iterate on each cell in table, either of following work: $('#tbl td').each(function () { var $cell = $(this); ...
Comments
Post a Comment