Php换行符超链接

时间:2018-05-31 07:47:24

标签: html css

希望在两行中有超链接。使用现有代码,他们是另一个

$string = 'This is (Name). I live in (Turkey). and so on with other brackets as well';

preg_match_all('/\((.*?)\)/i', $string, $matches);

print_r($matches[1]);

2 个答案:

答案 0 :(得分:0)

检查一下:

<a href="<?php echo site_url('inout/inoutverify');?>">Stock Verification</a> |
<a href="<?php echo site_url('inout/pricehistory'); ?> ">Price Change History</a> |

答案 1 :(得分:0)

a标记以内嵌方式显示。

您可以将它们显示为块display: block;

a {display: block;}

这将对所有a标签执行此操作,以便附加/添加类

<a class='displayBlock' href='<?php echo ( site_url('inout/inoutverify')?>'>Stock Verification</a>

a.displayBlock {display: block;}