在php中动态创建表 [英] create table dynamically in php

查看:59
本文介绍了在php中动态创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在php中动态创建表,提供文本框中的列数?

表应该在运行时创建。

Plz给出我的答案。

How can we create a table dynamically in php, providing the number of columns in a text box ?
The table should be created at run time.
Plz give me the answer.

推荐答案

你需要做的是这样的事情:



What you need to do is something like this:

<?php


rows = 10 ; // 定义行数
rows = 10; // define number of rows


cols = 4 ; // 定义列数

echo < table border ='1'>;

for(
cols = 4;// define number of columns echo "<table border='1'>"; for(


这篇关于在php中动态创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆