I am developing an accounting software as project. I want to count sets of variables in URL query string. eg
http://localhost/xampp/khata2/test/tableaddrow_nw.php?accname1=1&DrAmount1=1&CrAmount1=1&accname2=2+was2&DrAmount2=2&CrAmount2=2&accname3=3+was3&DrAmount3=3&CrAmount3=3&accname4=4+was4&DrAmount4=4&CrAmount4=4&accname5=5+was5&DrAmount5=5&CrAmount5=5&accname6=6+was6&DrAmount6=6&CrAmount6=6
There is a set of kind of rows in a query string accname1,DrAmount1,CrAmount1 .... accname6,DrAmount6,CrAmount6 so on which is generated dynamicaly as user inputs data in rows. how can i find out ho many rows a开发者_开发知识库re (set of data) are in query string ?
Any help is appreciated.
$rows = explode("&", $_SERVER['QUERY_STRING']);
This will give you an array of:
accname1=1
DrAmount1=1
CrAmount1=1
So you could get the total as count($rows)
.
Is this what you meant?
精彩评论