开发者

USing split and adding link based on it

A webpage displaying a ta开发者_运维技巧bular info: In thatt table one colunm name WEB_DETAILS has

For example:

db1:app1:filename
db2:app2:filename
db3:app3:filename
db4:app4:filename

It goes on....

Now i want to add a hyperlink for each(1 to end)...The condition here is I want to create a hyperlink which show file based on app1,app2,app4....(imagine that these are folder names).. WEB_DETAILS:The info in this comes from a query which retrives: In that i want to split and extract based on: the app name..How to do that?


Just do it like this:

 <a href="app1/filename"> db1 </a>


It sounds like you want to create a loop that will output these HTML links. For example

<?php
for($i=1;$i<5;$i++){ 
  echo "<a href='app$i/filename'>db$i</a><br>";
   }
 ?>

Although I don't know how that will fit into the context of your already existing table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜