Only first word of title retrieved with PHP showing

后端 未结 1 1536
傲寒
傲寒 2021-01-07 00:40

So I am trying to display a list from another website in mine, it all works fine but only the first word of the \'title\' attribute is stored. I know that the whole title is

相关标签:
1条回答
  • 2021-01-07 01:05

    Put title inside quotation marks

    echo "<td title =".$shipTitles[$key]." >";   // Wrong
    

    Right is

    echo "<td title ='".$shipTitles[$key]."' >";
    

    Without quotes, you will only see the word till the first space

    0 讨论(0)
提交回复
热议问题