使用PHP从我的DB保存文本创建链接

I am a bit stumped. I want to

  1. Get the "directory/filename with a space.pdf" from the DB (done)
  2. Create a page that displays the list of available pdf's (Here the fault lies)

    $stringOptions= $stringOptions. "<li><a href=". rawurldecode ($row['docContent']) .">". $row['docData'] ."</a></li>";
    
  3. Display the php page in the html. (Done)

The links get generated as www.thedomain.com/documents/filename and the rest with a space.pdf is lost. Or it creates a link /documents/filename+with+a+space and the .pdf is cut off and the domain is lost.

I tried encodeurl and rawencodeurl with the correlating rawdecodeurl and decodeurl functions but the URL is never successfully created. I have read the PHP manual but I am not a good enough coder to see what other functions I could/should use. Any help or direction please.