我有一个导航栏,图像和标题,我将在我的网站的每个页面中包含,所以我想使用php include在几个页面中引用此代码.但是,我认为我的语法可能有问题,或者因为它在加载时没有呈现任何内容.以下是一些代码段:
<!-- sample page --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<?php include ('headings.php'); ?>
</head>
<body>
<?php include ('navbar.php'); ?>
<?php include ('image.php'); ?>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
navbar.php
<?php
echo '<ul id="nav">
<li>
<a href="Home.html">Home</a>
</li>
<li>
<a>About Me</a>
<ul>
<li>
<a href="Career.html">Career</a>
</li>
<li>
<a href="Coding.html">Coding</a>
</li>
<li>
<a href="Personal.html">Personal</a>
</li>
</ul>
</li>
<li>
<a href="Travels.html">Travel</a>
</li>
<li>
<a href="Contact.html">Contact</a>
</li>
</ul>';
?>
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助!
我有一列单元格,其值如下所示:
a
a
b
b
c
c
c
c
d
e
f
f
Run Code Online (Sandbox Code Playgroud)
等等
我希望获取非重复值并将它们粘贴到新列中.我的伪代码如下:
ActiveSheet.Range("a1").End(xlDown).Select
aend = Selection.Row
for acol= 1 to aend
ActiveSheet.Range("b1").End(xlDown).Select
bend = Selection.Row
'if Cells(1,acol).Value <> any of the values in the range Cells(2,1).Value
'to Cells(2,bend).Value, then add the value of Cells(1,acol) to the end of
'column b.
Run Code Online (Sandbox Code Playgroud)
我的逻辑是否有意义?我不知道如何编写评论部分.如果这不是最有效的方法,那么有人会提出更好的方法吗?非常感谢!