{"id":1805,"date":"2018-02-01T00:26:22","date_gmt":"2018-02-01T00:26:22","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1805"},"modified":"2018-02-01T18:28:58","modified_gmt":"2018-02-01T18:28:58","slug":"create-table-dynamically-using-php","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2018\/02\/create-table-dynamically-using-php\/","title":{"rendered":"Create table dynamically using php."},"content":{"rendered":"<pre lang=\"php\">\r\n\r\n$rows = 20; \/\/ define number of rows\r\n$cols = 6;\/\/ define number of columns\r\n\r\necho \"<table border='1'>\";\r\n\r\nfor($tr=1;$tr<=$rows;$tr++){\r\n\r\n    echo \"<tr>\";\r\n        for($td=1;$td<=$cols;$td++){\r\n               echo \"<td>row: \".$tr.\" column: \".$td.\"<\/td>\";\r\n        }\r\n    echo \"<\/tr>\";\r\n}\r\n\r\necho \"<\/table>\";\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>$rows = 20; \/\/ define number of rows $cols = 6;\/\/ define number of columns echo &#8220;&#8221;; for($tr=1;$tr<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1805","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=1805"}],"version-history":[{"count":4,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1805\/revisions"}],"predecessor-version":[{"id":1813,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1805\/revisions\/1813"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}