doufanglian7585 2017-05-16 13:34
浏览 15

php在链接中显示另一个字段值

in this situation, has two relevant fields:

CertRef and Cert, where the certref is just a varchar field and the certref is a mediumtextfield that I use to upload files to with a handler.

This all works fine.

On the view page, I have used a code before in the past, shown below, that instead of displaying the file name, it provides a hyperlink to open the document via googledocs and displayed 'view' as the hyperlink:

$fileArray = my_json_decode($value);
$value="";
for($i = 0; $i < count($fileArray); $i++)
{
    $value .= "<a target=_blank href='https://docs.google.com/viewer?url=http://xxxxxxx.com/".$fileArray[$i]["name"]."'>View</a> ";
}

This works fine, however, what I would like to do is set this code on the Certificate field, which contains the file BUT instead of view, to display the value of the CertRef field as a hyperlink.

Any ideas would be gratefully appreciated.

  • 写回答

0条回答 默认 最新

    报告相同问题?